Ravindra BagaleCourses & study guides Track your progress

Guides

Conditional Formatting in Power BI

Conditional formatting changes colour, icons, or data bars from the value itself — so a late delivery turns red and a strong city stays green without the reader scanning every cell.

Friends! A table full of black numbers hides risk. Why? The eye needs a stop light. How? We format a fictional FreshBasket delivery column with a simple rule (≥ 30 minutes = red), then we peek at gradient and a colour measure. Rules first. Calm colours.

Quick answer

Vertical path:

  1. Select a table or matrix with [Delivery Mins] or [Total Sales].
  2. Format visual → Cell elements (or the colour fx on a chart).
  3. Background colour → Rules → ≥ 30 → red.
  4. Use Gradient when you want a heat map, not a hard cut.
  5. Use Field value when a DAX colour measure returns #E11D48.
  6. Read the page: red must mean the business sentence you wrote.

Real example: phone-bill days late, shop deliveries

Shop delivery sample (fictional):

City Order Delivery Mins
Mumbai M-1 18
Mumbai M-2 35
Pune P-1 12

Owner rule: 30 minutes or more is late.

What conditional formatting does:

  1. Rows stay the same three rows.
  2. M-2’s cell turns red. M-1 and P-1 stay calm.
  3. The number 35 does not change. Only the paint changes.
  4. A card of average minutes can use the same idea with a colour measure later.

Phone-bill cousin: months where the bill jumped above 500 can turn amber. Same tool, different column.

What do I need before this guide?

Before and after (look at the tables first)

Before conditional formatting Delivery minutes without colour rules.

Before

After conditional formatting Late delivery row flagged by rule.

After

Three format styles

Cf Rules Conditional formatting paints cells or bars from rules, a colour scale, or a colour measure (field value). Cf Rules Conditional formatting paints cells or bars from rules, a colour scale, or a colour measure (field value).

Conditional formatting paints cells or bars from rules, a colour scale, or a colour measure (field value).

  1. Rules — hard bands. Above 30 = red. Best for SLA and targets.
  2. Gradient (colour scale) — low to high blend. Best for heat maps.
  3. Field value — a measure or column already holds the colour (or a category you map).
Cf Fx Look for the small fx button on colour and title settings — that is how you drive format from a measure. Cf Fx Look for the small fx button on colour and title settings — that is how you drive format from a measure.

Look for the small fx button on colour and title settings — that is how you drive format from a measure.

Why the fx button exists: almost every colour and many titles can be driven by a field instead of a fixed pick. Look for fx before you say “Power BI cannot do that”.

KPI colour on a chart

Cf Kpi Red Shop rule: delivery minutes above 30 turn red. Readers see risk without reading every number. Cf Kpi Red Shop rule: delivery minutes above 30 turn red. Readers see risk without reading every number.

Shop rule: delivery minutes above 30 turn red. Readers see risk without reading every number.

  1. Select the bar chart.
  2. Columns → Colour → fx → Rules on [Delivery Mins] or on a status measure.
  3. Or build Delivery Colour = IF ( [Delivery Mins] >= 30, "#E11D48", "#16A34A" ) and use Field value.
  4. Title the visual so “red = late” is written, not guessed.

What you see: Mumbai’s late bar turns red. Pune’s fast bar stays green. Totals still add the minutes; colour is not a filter.

Mistakes and calm fixes

Symptom Likely cause Fix
Nothing turns red Rule on wrong field / blank measure Test the measure on a card first
Total row looks wild Rule applied where grain differs Format values, review totals
Too many colours Every column decorated One KPI colour story per page
Red means good Direction never defined Document “high is bad” for times

Ravindra Bagale's Tip

Interview line: “I start with Rules for SLAs, Gradient for heat maps, and a colour measure when the logic is business-specific.” Then point at fx. Got it?

Practice task

  1. Build the three-row delivery table.
  2. Rule: ≥ 30 red.
  3. Add a gradient on Sales for contrast.
  4. Write the sentence each colour means.

Learn it properly

Course lessons:

Related: KPI and cards · IF and SWITCH

Got it? Conditional formatting paints the story — rules, gradient, or a colour measure. Next: hierarchy and drill down. Let us go ahead.

Frequently asked questions

Where is conditional formatting?

On tables and matrices under Cell elements, and on many colour settings via the fx button. Titles can use fx too.

Rules vs gradient?

Rules are hard bands (above 30 = red). Gradient is a smooth scale from low to high.

What is field value?

The colour comes from a measure or column that already stores a colour code or a category the format maps.

Why is nothing red?

The rule tests the wrong field, the measure is blank, or you formatted values while looking at a total row.

Icons and data bars?

Same Cell elements menu. Use icons for status, data bars for length inside the cell.

Course lessons?

Conditional formatting rules and KPI-based colouring, in the dynamic text and colour chapter.