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
What To Do When Stocks Go Down? (This Is What I Did)
How to Use the Forex Economic Calendar for Successful Trading
Pet For Sale Craigslist
Sandrail Options and Accessories
Phone Number For Walmart Automotive Department
15 Types of Pancake Recipes from Across the Globe | EUROSPAR NI
Gameplay Clarkston
Monticello Culver's Flavor Of The Day
Natureza e Qualidade de Produtos - Gestão da Qualidade
Ladyva Is She Married
Syracuse Jr High Home Page
WWE-Heldin Nikki A.S.H. verzückt Fans und Kollegen
Sams Early Hours
Dump Trucks in Netherlands for sale - used and new - TrucksNL
Jvid Rina Sauce
Fear And Hunger 2 Irrational Obelisk
Tcu Jaggaer
24 Best Things To Do in Great Yarmouth Norfolk
Immortal Ink Waxahachie
CANNABIS ONLINE DISPENSARY Promo Code — $100 Off 2024
Craigslist Missoula Atv
Kirksey's Mortuary - Birmingham - Alabama - Funeral Homes | Tribute Archive
Craigslist St. Cloud Minnesota
All Obituaries | Verkuilen-Van Deurzen Family Funeral Home | Little Chute WI funeral home and cremation
Craigslist Illinois Springfield
What Individuals Need to Know When Raising Money for a Charitable Cause
Marquette Gas Prices
Craigslist Rome Ny
Busted Mugshots Paducah Ky
2023 Ford Bronco Raptor for sale - Dallas, TX - craigslist
Sinfuldeed Leaked
Ringcentral Background
Tmj4 Weather Milwaukee
Vitals, jeden Tag besser | Vitals Nahrungsergänzungsmittel
Maxpreps Field Hockey
Skip The Games Grand Rapids Mi
Postgraduate | Student Recruitment
manhattan cars & trucks - by owner - craigslist
Shoecarnival Com Careers
Hampton In And Suites Near Me
UWPD investigating sharing of 'sensitive' photos, video of Wisconsin volleyball team
Cvs Coit And Alpha
Adams-Buggs Funeral Services Obituaries
Premiumbukkake Tour
Jackerman Mothers Warmth Part 3
Ajpw Sugar Glider Worth
The Quiet Girl Showtimes Near Landmark Plaza Frontenac
Itsleaa
Obituaries in Westchester, NY | The Journal News
Noaa Duluth Mn
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.