From the course: Tableau: Mastering Calculations

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Comparing numbers

Comparing numbers

If you want to compare two numbers and then use the higher or lower value, you can do this using two functions that you have already encountered in another context. Let's take a look. Minimum of expression one and expression two will return the minimum of two expressions for each record, so it will return the lower of two values, while maximum will do the opposite. It will return the higher of two values. Of course, you can nest several MIN or MAX functions to compare more than two values. Now please note that as soon as one of the compared values is null, meaning it doesn't contain any value, the comparison cannot be carried out and null is also returned as a result because null result can be calculated. Now these type of MIN or MAX functions can be particularly helpful if you want to limit a value to a certain range of numbers. For example, let's take a look at our processing time in days here. I'm currently using it as a discrete dimension. Ideally, our processing time takes a…

Contents