Understanding the difference between NULL and 0 (2024)

Recently a client asked me what is the difference between NULL and 0 values in Tableau. The answer to that is rather simple: a NULL means that there is no value, we’re looking at a blank/empty cell, and 0 means the value itself is 0. Considering there is a difference between NULL and 0, the way Tableau treats these two values therefore is different as well. Here below I will show you this in a quick example.

Explaining the difference between NULL or 0:

Imagine you’re selling fruit and want to keep track of how many items of each fruit you’ve sold. You’re quite the boss in the fruit industry so you actually own not one, but three stores. Your overview of sold fruits on a particular day might look something like this:

Understanding the difference between NULL and 0 (1)

Ok, so sales weren’t that great, but let’s keep the numbers simple for this example.

You see that in the overview that Store A has two NULL values. This is because Store A doesn’t sell apples and strawberries, so we left those cells empty. We don’t want to add 0 here, because this whole category should be left out of your calculations. You don’t sell it, you don’t want to include it.

Store B and C both do sell apples, but just didn’t sell any that day. Therefore we put a 0 in those cells. Store C is the only store that sells strawberries, but unfortunately didn’t sell any of those either, so also a 0 there.

If you look at this on a sheet in Tableau, this is how the data will be displayed:

Understanding the difference between NULL and 0 (2)

You see the NULL values turning up as empty cells, and 0 will show up just as the number 0.

Calculations with NULL values

Now here is where it becomes relevant if you have a NULL value or an 0 value: when you want to do calculations.

If we want to look at our average sales for the day, we only want to take into account the fruits that we are actually selling in that store. So for store A you want your total sales divided by 3, not by 5. For Store B you want your sales divided by 4, and for Store C, who sells every type of fruit, you want the total sales divided by the total number of fruits: 5.

This is exactly what happens with these empty cells! Tableau will only take a category into the calculation if it actually has a value assigned to it. As you can see this will give us different averages for each store:

Understanding the difference between NULL and 0 (3)

Keep in mind that all three stores have the exact same amount of sold fruits. Still the numbers for all the stores are different, because:

14 / 3 = 4,667
14 / 4 = 3,500
14 / 5 = 2,800

As you can see it’s important to keep this in mind when working with Tableau, as you will get different results.

Wanna learn more about Tableau or Alteryx? Do you want to use these tools to their full potential? Check out ourtrainingsandconsultancy services!

Understanding the difference between NULL and 0 (2024)
Top Articles
How to invest money | A step-by-step guide to choosing and managing your own investments
How to Stop Apps From Running in the Background on Android
What Did Bimbo Airhead Reply When Asked
Frases para un bendecido domingo: llena tu día con palabras de gratitud y esperanza - Blogfrases
Skylar Vox Bra Size
Design215 Word Pattern Finder
Devon Lannigan Obituary
Plaza Nails Clifton
Mcfarland Usa 123Movies
Txtvrfy Sheridan Wy
What Auto Parts Stores Are Open
Poplar | Genus, Description, Major Species, & Facts
Chuckwagon racing 101: why it's OK to ask what a wheeler is | CBC News
Nestle Paystub
South Ms Farm Trader
What Does Dwb Mean In Instagram
Capitulo 2B Answers Page 40
Mlb Ballpark Pal
Dexter Gomovies
Rams vs. Lions highlights: Detroit defeats Los Angeles 26-20 in overtime thriller
Sadie Proposal Ideas
Nhl Tankathon Mock Draft
Mychart Anmed Health Login
Quadcitiesdaily
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Heart and Vascular Clinic in Monticello - North Memorial Health
Iu Spring Break 2024
Poe Str Stacking
Quest: Broken Home | Sal's Realm of RuneScape
Yisd Home Access Center
Tips and Walkthrough: Candy Crush Level 9795
Marokko houdt honderden mensen tegen die illegaal grens met Spaanse stad Ceuta wilden oversteken
In hunt for cartel hitmen, Texas Ranger's biggest obstacle may be the border itself (2024)
Grove City Craigslist Pets
Ff14 Laws Order
new haven free stuff - craigslist
Nsu Occupational Therapy Prerequisites
KITCHENAID Tilt-Head Stand Mixer Set 4.8L (Blue) + Balmuda The Pot (White) 5KSM175PSEIC | 31.33% Off | Central Online
Emerge Ortho Kronos
19 Best Seafood Restaurants in San Antonio - The Texas Tasty
How to play Yahoo Fantasy Football | Yahoo Help - SLN24152
Henry Ford’s Greatest Achievements and Inventions - World History Edu
Guided Practice Activities 5B-1 Answers
Hk Jockey Club Result
Florida Lottery Powerball Double Play
New Zero Turn Mowers For Sale Near Me
Wzzm Weather Forecast
Nurses May Be Entitled to Overtime Despite Yearly Salary
Mlb Hitting Streak Record Holder Crossword Clue
Random Warzone 2 Loadout Generator
Poster & 1600 Autocollants créatifs | Activité facile et ludique | Poppik Stickers
Craigslist Indpls Free
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 6283

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.