← 30 Days Power BI Series
Day 13 of 30IntermediateFormatting

Day 13: Conditional Formatting in Power BI

5 questions · Power BI Interview Preparation

Q1

How do you apply conditional formatting to a table or matrix in Power BI?

Select the Table/Matrix visual → Format pane → scroll to the column you want to format → click "Conditional formatting" → choose the format type: Background colour (colour scale or rules), Font colour, Data bars (in-cell bars), Icons (arrows, flags, shapes), Web URL (turn text into hyperlinks). Each type has two modes: Gradient (colour scale based on value range) or Rules (define specific conditions with custom colours). This is the fastest way to make a large data table scannable at a glance.

💡 Interview tip: Conditional formatting in Power BI tables is one of the most commonly used features in business reporting. Know how to set up a gradient colour scale and a rules-based icon set.
Q2

How do you create a traffic light (icon) conditional format?

Select the column → Format pane → Conditional formatting → Icons → Rules mode → set 3 rules: Green (value >= target), Yellow (value between 85%-100% of target), Red (value < 85% of target). Choose the traffic light icon style. If your target is dynamic (from a measure), use a "Field value" icon format — create a DAX measure that returns the icon name: IF([Achievement %] >= 1, "Green circle", IF([Achievement %] >= 0.85, "Yellow circle", "Red circle")). This makes the icon respond to measure logic dynamically.

💡 Interview tip: Traffic light icons in reports immediately communicate performance without numbers. Know both the rules-based approach (simpler) and the field value approach (more flexible for dynamic thresholds).
Q3

How do you format a measure value differently based on a condition?

Power BI does not support conditional number formatting natively per cell for measures. Workarounds: (1) Create a separate string measure that formats the number and adds the condition: Format(Revenue, "₹#,##0.0M") — but then it is text, not a number. (2) Use colour conditional formatting to signal the condition visually while keeping the number. (3) Use Icons or Data Bars alongside the number to add visual context without changing the number format. For dashboards: combine a number card with an icon visual positioned nearby for the same effect.

💡 Interview tip: This is a known Power BI limitation — conditional formatting applies to colours, icons, and bars but not to the number format itself. Know the workarounds.
Q4

How do you highlight the max or min value in a column automatically?

Table/Matrix → Format → Conditional formatting → Background Colour → Gradient → set: Minimum = red or white, Maximum = green. Or: Rules mode → Add rule: "If value is top 1 (absolute) then format as green". Rules mode with "Top N" or specific value conditions gives precise control. For a KPI table showing all sales reps and highlighting the top performer: Rules → "If value is top 1" → bright green background. Automatically updates when data refreshes.

💡 Interview tip: Highlighting top/bottom performers automatically makes reports dynamic and eliminates manual highlighting that breaks on refresh.
Q5

How do you apply conditional formatting based on a measure result?

Format → Conditional formatting → choose format type → click "Field value" instead of Rules or Gradient → select the measure that returns the format specification. For colours: create a measure that returns a colour name or hex code: Status Colour = IF([Achievement %] >= 1, "#16a34a", IF([Achievement %] >= 0.85, "#d97706", "#dc2626")). Power BI uses this hex colour for the background or font colour of each cell. This is the most powerful approach — the colour logic lives in DAX and responds to all filter context changes.

💡 Interview tip: Field value conditional formatting is the most flexible approach. The measure returns the colour, icon, or data bar value — giving full DAX logic control over formatting.
← Day 12All DaysDay 14

Want live Power BI coaching?

Join EVIKA Academy for hands-on Power BI training with real projects and placement support in Delhi NCR.

Book Free Demo →
Best Data Analytics Course in Noida Delhi NCR | EVIKA ACADEMY