In this blog post we discover how you can replace empty fields in tables with a zero. As you will see below, this is very straightforward.
You can see in this table that some values are empty, that is because there is no corresponding value if that metric for a specific row. For example, when you have null values in your dataset.
You can clean this up by properly displaying ‘0’ values for each of the metrics that have empty values.
Doing this is fairly easy. If you have the following expression…
… you can easily replace empty values with a zero by wrapping the expression in the ZN function.
That is how you replace empty values with a zero in Tableau.