In this silent video you’ll learn how to replace NULL or missing data with zeros or existing data by reshaping the view and using the ZN(LOOKUP()) function in Tableau.
Read the full article here: Replace NULL or Missing Data With Zeros or Existing Data — [ Ссылка ]
- - - - - - - - - - - - - -
This option will replace NULL, missing, or filtered out data with zeros.
1. Move [Stage] from the Rows shelf to the Columns shelf
2. Select Analysis and then Create Calculated Field
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 zero (opt 3)", enter the formula similar to the suggestion in the article and then click OK.
NOTE: The LOOKUP() calculation will look up the value of the current cell (specified by the second argument of LOOKUP() which is a 0) in the view, if that value is NULL then the ZN() function will return zero.
4. 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 3)", 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.
5. Replace [Amount] on Text on the Marks card with the desired new value depending on the desired end result
6. (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 — [ Ссылка ]
Displaying Missing Values as Strings for a Measure — [ Ссылка ]
Join Your Data — [ Ссылка ]
- - - - - - - - - - - - - -
Subscribe to the Tableau YouTube channel here: [ Ссылка ]
Free Trial of Tableau: [ Ссылка ]
Ещё видео!