Show 0 if value has no data - Tableau

0 votes
I need to classify my dataset into groups depending on sales and store wise details. I'm fetching my data from the database, so it contains null or empty values. How to replace them with 0 for calculation purpose.

How to display 0 if there is no data (null or empty) corresponding to that field in a row?
Apr 24 in Tableau by abhay
703 views

1 answer to this question.

0 votes

Hi Abhay,

To replace null or empty values you can use ZN() or ISNULL() to check and show 0.

Using ZN() - 

ZN function is used to return 0 or not null values for a column. It takes a field as a parameter.

ZN([Phone No]) would return phone no if or null else gives 0.

Using ISNULL() -

 ISNULL([Field] returns true if value is NULL.

Hope this helps you.

answered Apr 24 by Cherukuri
• 25,900 points

Related Questions In Tableau

0 votes
1 answer
0 votes
1 answer

How to use tableau to searh for text within entire data

You can use a pivot table in ...READ MORE

answered Apr 4, 2018 in Tableau by xyz
• 1,550 points
50 views
0 votes
1 answer

Display highest value in quarterly data

I guess your field name is in ...READ MORE

answered Apr 6, 2018 in Tableau by QueenBee
• 1,810 points
16 views
0 votes
1 answer

How to dynamically determine and categorize duplicate value in Tableau?

Apparently you define a duplicate records as ...READ MORE

answered Apr 12, 2018 in Tableau by xyz
• 1,550 points
1,826 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,814 views
+1 vote
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
77 views
+2 votes
1 answer
0 votes
1 answer

Show color bar even when no data in bar chart

Hi Latha, Follow the below steps: 1. Create the ...READ MORE

answered May 9 in Tableau by Cherukuri
• 25,900 points
23 views
0 votes
1 answer

Rank measure values and show percentage of measures in Tableau

Hi Sindhu, 1. First create a table with ...READ MORE

answered Mar 8 in Tableau by Cherukuri
• 25,900 points
261 views