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 - Tableau Tutorial
From the course: Tableau: Mastering Calculations
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…
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.
Contents
-
-
-
-
-
-
(Locked)
Arithmetic operators3m 32s
-
(Locked)
Pitfall: Calculating weighted ratios5m 48s
-
(Locked)
Calculating absolute values and signs2m 8s
-
(Locked)
Float to integer: Rounding and truncating3m 39s
-
(Locked)
Calculating powers2m 4s
-
(Locked)
Comparing numbers3m 14s
-
(Locked)
Challenge: Weighted discount1m 51s
-
(Locked)
Solution: Weighted discount3m 37s
-
(Locked)
-
-
-
-