Challenge - 5 Problems
IF Function Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ dax_lod_result
intermediate2:00remaining
Evaluate IF function with nested conditions
Given the DAX measure below, what is the output when the SalesAmount is 1500?
Result = IF(SalesAmount > 1000, "High", IF(SalesAmount > 500, "Medium", "Low"))
Power BI
Result = IF(SalesAmount > 1000, "High", IF(SalesAmount > 500, "Medium", "Low"))
Attempts:
2 left
💡 Hint
Check the first condition and see if it is true for 1500.
✗ Incorrect
Since 1500 is greater than 1000, the first IF condition is true, so the output is "High".
❓ visualization
intermediate2:00remaining
Choose the correct visualization for IF condition results
You created a measure using IF to categorize sales as "High", "Medium", or "Low". Which visualization best shows the count of sales in each category?
Attempts:
2 left
💡 Hint
Think about showing parts of a whole for categories.
✗ Incorrect
A pie chart clearly shows the proportion of each sales category, making it easy to compare counts visually.
🧠 Conceptual
advanced2:00remaining
Understanding IF function short-circuit behavior
In Power BI DAX, when using nested IF functions, which statement is true about evaluation?
Attempts:
2 left
💡 Hint
Think about efficiency and how IF works in programming.
✗ Incorrect
DAX IF functions stop evaluating once a TRUE condition is found, returning that result immediately.
🔧 Formula Fix
advanced2:00remaining
Identify the error in this IF function
What error will this DAX measure produce?
CheckValue = IF(SalesAmount > 1000, "High", "Medium", "Low")
Attempts:
2 left
💡 Hint
Check the number of arguments IF accepts.
✗ Incorrect
The IF function accepts only 3 arguments: condition, value if true, value if false. This has 4 arguments, causing a syntax error.
🎯 Scenario
expert3:00remaining
Create a measure to classify sales with multiple conditions
You want to create a DAX measure that classifies sales as:
- "Excellent" if SalesAmount > 2000
- "Good" if SalesAmount > 1000 and <= 2000
- "Average" if SalesAmount > 500 and <= 1000
- "Poor" if SalesAmount <= 500
Which of the following DAX expressions correctly implements this?
- "Excellent" if SalesAmount > 2000
- "Good" if SalesAmount > 1000 and <= 2000
- "Average" if SalesAmount > 500 and <= 1000
- "Poor" if SalesAmount <= 500
Which of the following DAX expressions correctly implements this?
Attempts:
2 left
💡 Hint
Remember that nested IFs check conditions in order, so use > and rely on order to cover ranges.
✗ Incorrect
Option C correctly uses nested IFs with > comparisons and order to cover all ranges without overlap or gaps.