TutorialsPower BIConditional Formatting in Power BI

Conditional Formatting in Power BI

Apply colour scales, data bars, and icon sets to make key values stand out

Conditional formatting in Power BI highlights important values automatically — green for above target, red for below, data bars showing magnitude, icons for status. It makes tables and matrices dramatically more readable and helps executives spot issues at a glance. Power BI supports conditional formatting on table and matrix cells, as well as on chart elements like bar colours and data label colours.

Example

Apply conditional formatting to a table
FOR A TABLE OR MATRIX:

1. SELECT the visual → go to Format pane (paint roller)
2. Find "Cell elements" (Table) or "Values" section
3. For the column you want to format:
   Click the "fx" icon next to "Background color"

CONDITIONAL FORMAT OPTIONS:
  Gradient (colour scale):
    Based on: Field value or Rules
    Minimum: Red → Maximum: Green (traffic light style)

  Rules (threshold-based):
    IF value is < 0       → Red background
    IF value is 0 to 5000 → Yellow background
    IF value is > 5000    → Green background

  Field value (use a DAX measure to drive colour):
    Create a measure returning a hex colour:
    SalesColour = IF([Total Sales] > 50000, "#16a34a", "#dc2626")
    Set "Based on field" → SalesColour measure

DATA BARS (inline bar in a cell):
  Format pane → Cell elements → Data bars → On
  Shows a proportional bar inside each cell

ICONS (status indicators):
  Cell elements → Icons → On
  Use Rules: < 0 = down arrow, 0-5000 = dash, > 5000 = up arrow

Key Points

  • Conditional formatting is per-column in a table/matrix — select each column separately
  • Gradient is good for continuous values (sales, score). Rules are good for thresholds.
  • Hex colour measures give the most flexibility — full DAX logic drives colours
  • Data bars in cells eliminate the need for a separate bar chart for simple comparisons
  • Conditional formatting also works on chart background colour and title text

Practice Question

You want cells in a matrix to show green when Profit > ₹10,000 and red otherwise. Which conditional formatting approach should you use?