Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)
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?

1 Answer

0 votes
by (47.2k points)

Hi Vaibhav,

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

Using ZN()

ZN function is basically 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.

Further, enroll for an online training course to clear the Tableau Desktop Specialist Certification exam. I would recommend this Tableau Certification Program by Intellipaat.

Related questions

0 votes
2 answers
asked Dec 10, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer
asked Dec 12, 2020 in BI by Chris (11.1k points)
0 votes
1 answer

Browse Categories

...