Bird
0
0

You want to apply conditional formatting to a table column to show green for positive values, red for negative, and no color for zero. Which DAX formula correctly implements this?

hard📝 Scenario Q9 of 15
Power BI - Formatting and Design
You want to apply conditional formatting to a table column to show green for positive values, red for negative, and no color for zero. Which DAX formula correctly implements this?
AIF([Value] > 0, "Green", "Red")
BSWITCH(TRUE(), [Value] > 0, "Green", [Value] < 0, "Red", "No Color")
CIF([Value] >= 0, "Green", "Red")
DIF([Value] <> 0, "Green", "Red")
Step-by-Step Solution
Solution:
  1. Step 1: Understand the conditions needed

    Green for positive, red for negative, no color for zero means three conditions.
  2. Step 2: Check which formula handles all three correctly

    SWITCH(TRUE(), [Value] > 0, "Green", [Value] < 0, "Red", "No Color") uses SWITCH with TRUE() to check multiple conditions and returns correct colors or no color.
  3. Final Answer:

    SWITCH(TRUE(), [Value] > 0, "Green", [Value] < 0, "Red", "No Color") -> Option B
  4. Quick Check:

    Multiple conditions need SWITCH or nested IFs [OK]
Quick Trick: Use SWITCH(TRUE()) for multiple conditional formatting cases [OK]
Common Mistakes:
  • Using only IF with two conditions
  • Ignoring zero case
  • Returning wrong color for zero

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Power BI Quizzes