How to replace NULL or missing data with zeros or existing data using the ZN function in Tableau

Описание к видео How to replace NULL or missing data with zeros or existing data using the ZN function in Tableau

In this silent video you’ll learn how to do use ZN() function to replace NULL or missing data with zeros or existing data in Tableau.

Read the full article here: Replace NULL or Missing Data With Zeros or Existing Data — https://kb.tableau.com/articles/howto...

- - - - - - - - - - - - - -

1. Select Analysis and then Create Calculated Field
2. In the Calculated Field dialog box that opens, Name the calculated field. In this example, the calculated field is named "Replace empty cells with zero (opt 1)", enter the formula similar to the suggestion in the article and then click OK.
NOTE: The ZN() function will replace any NULL values with zero
3. In the Calculated Field dialog box that opens, Name the calculated field. In this example, the calculated field is named "Replace empty cells with last value (opt 1)", enter the formula similar to the suggestion in the article and then click OK.
NOTE: IFNULL(..., PREVIOUS_VALUE(0)) will replace any NULL values with the last value of this calculation, which creates a running last value. Depending on how the view is built, it may be necessary to compute PREVIOUS_VALUE() differently. See Transform Values with Table Calculations
4. Replace [Amount] on Text on the Marks card with either [Replace empty cells with zero (opt 1)] or [Replace empty cells with last value (opt 1)] depending on the desired end result
5. (Optional) Customize the values in the view by right-clicking the value and formatting it as desired.


Related solutions:
Show or Hide Missing Values or Empty Rows and Columns — https://help.tableau.com/current/pro/...
Displaying Missing Values as Strings for a Measure — https://kb.tableau.com/articles/HowTo...
Join Your Data — https://help.tableau.com/current/pro/...

- - - - - - - - - - - - - -

Subscribe to the Tableau YouTube channel here: http://www.youtube.com/subscription_c...

Free Trial of Tableau: https://www.tableau.com/products/trial

Комментарии

Информация по комментариям в разработке