What does the IF function do in Tableau?
The IF function checks a condition and returns one value if the condition is true, and another value if it is false.
How is IIF different from IF in Tableau?
IIF is a shorthand for IF that always requires three parts: condition, value if true, and value if false. It is simpler for quick true/false checks.
What is the purpose of the CASE function in Tableau?
CASE evaluates an expression and compares it to multiple values, returning the matching result. It is like a cleaner way to write multiple IF statements.
Write a simple IF statement in Tableau to check if Sales are greater than 1000.
IF [Sales] > 1000 THEN 'High' ELSE 'Low' END
When should you use CASE instead of multiple IF statements?
Use CASE when you have one expression to compare against many fixed values. It makes your formula easier to read and maintain.
Which function in Tableau requires a condition, a true result, and a false result all in one line?
IIF requires condition, true result, and false result in one line, making it a shorthand for IF.
What does the CASE function do?
CASE compares one expression to multiple values and returns the matching result.
Which keyword ends an IF statement in Tableau?
IF statements in Tableau must end with the keyword END.
What will this formula return if [Sales] = 500? <br>IF [Sales] > 1000 THEN 'High' ELSE 'Low' END
Since 500 is not greater than 1000, the ELSE part returns 'Low'.
Which function is best for checking multiple conditions with different outcomes?
CASE is best for multiple conditions with different outcomes based on one expression.
Explain how IF and IIF functions work in Tableau and when you might use each.
Describe a scenario where using CASE is better than multiple IF statements in Tableau.