From the course: Tableau: Mastering Calculations
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Treating null values - Tableau Tutorial
From the course: Tableau: Mastering Calculations
Treating null values
Even with logical calculations, you may have to think about how you deal with null values which represent the absence of values. If the field that you are referencing in your logic contains null, then ISNULL might be relevant. Let's take a look at another example for the profitability. Let's check this at transaction level. If the profit is above zero, then it's profitable. Else if the profit is lesser than or equal to zero, then a transaction is unprofitable. And else if the profit ISNULL, so does not contain a value, then it's unknown whether this transaction is profitable or not. And again, we end with end. Sometimes your logical formula can also produce null values. This happens when your logic doesn't cover a specific case. This most often happens when no else is set, for example, in the target sales zones that we just created, we can try what happens if we remove the else statement. The easiest way of doing that is turning it into a comment. This has the benefit that if we…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.