Power BI conditional formatting: gradient to shade every value, rules to flag values past a threshold, data bars to show size inside the table
  • TIPS & TRICKS/
  • Power BI Conditional Formatting: Gradients, Rules and Data Bars/
Tips & Tricks

Power BI Conditional Formatting: Gradients, Rules and Data Bars

Written by FutureSavvy Team
Updated 30 Nov 2026 · 7 min read

A table of numbers makes the reader do all the work. Conditional formatting in Power BI does some of it for them: it colours cells, adds bars or shows icons based on the values, so the biggest and smallest numbers stand out before anyone reads a single figure.

This guide builds all three of the formats you will use most, on one small table: a gradient that shades every value, rules that flag values past a threshold, and data bars that show size inside the cell. It also covers the fourth option, Field value, for when you want a DAX measure to decide the colour.

Every screenshot was taken in the Power BI service in a browser in November 2026, using a made-up office supplies dataset. Power BI Desktop has the same Format pane and the same dialogs, so the steps work in both.

Where conditional formatting lives

Start with a table or matrix visual. The example here is a table with three fields: Product, Sum of Revenue and Sum of Units.

Select the visual, open the Format visual tab in the Visualizations pane, choose Visual, and expand Cell elements. Everything in this guide starts from this card.

Two things to set before you switch anything on:

  • Series picks the column you are formatting. Each column keeps its own settings, so set it to Sum of Revenue before formatting revenue, then change it to Sum of Units for the units column.
  • Each format has its own switch and its own fx button. The switch turns the format on with default settings. The fx button opens the dialog where you choose how it works.

There is a quicker route to the same dialogs: in the Build visual tab, click the arrow next to a field in the Columns well and choose Conditional formatting.

Shade every value with a gradient

Turn on Background color with Series set to Sum of Revenue, then click its fx button. The dialog opens on the Gradient format style.

The settings that matter:

  • What field should we base this on? is the value that decides the colour. It defaults to the column you are formatting, but it can be any field or measure in the model. You could, for example, colour revenue by margin.
  • Minimum and Maximum default to Lowest value and Highest value, so the colours stretch across whatever is in the table. Change either to Number to fix the end points, which keeps the colours stable when a filter changes the data.
  • Add a middle color gives a three-colour scale, which suits data with a natural midpoint such as zero or a target.
  • How should we format empty values? chooses whether blanks are coloured as zero or left alone.
  • Apply to chooses whether the Total row is coloured too. Values only is usually right, because the total is far larger than any single row and would always take the end colour.

Click OK. Headsets, the lowest revenue at 38,745, takes the minimum colour and Desks, the highest at 202,188, takes the maximum. Everything in between is blended.

A gradient answers "which is biggest?" well. It is less good at "which ones need attention?", because every cell gets a colour and none of them stands out as a warning. For that, use rules.

Flag values with rules

Open the fx dialog again and change Format style to Rules. Each rule reads like a sentence: if the value is in this range, then use this colour. Click New rule to add another.

The two rules here are:

  • If value is >= 50 Percent and <= 100 Percent, then green.
  • If value is >= 0 Percent and < 25 Percent, then amber.

The dropdown after each number switches between Number and Percent, and the difference matters.

  • Number compares against the actual value, such as revenue of 100,000 or more. Use it for real business thresholds that should not move.
  • Percent compares against the position in the range between the lowest and highest values on screen. Here the range runs from 38,745 to 202,188, so 50 Percent is about 120,467 and 25 Percent is about 79,606. Use it when you want "the top half" or "the bottom quarter", whatever the numbers turn out to be.

Click OK. Desks and Monitors are in the top half of the range and turn green. Headsets is in the bottom quarter and turns amber. Chairs and Docking stations match neither rule, so they keep the normal background, which is exactly what makes the coloured cells stand out.

Keep the ranges from overlapping, and leave a gap for "nothing to see here". A rule set that colours every cell has turned back into a gradient.

Show size with data bars

Change Series to Sum of Units and turn on Data bars. Power BI draws a bar behind each number, scaled from the lowest value to the highest. Click the fx button to adjust it.

  • Minimum and Maximum set the scale, like the gradient. Lowest value to Highest value exaggerates small differences: units here only run from 752 to 964, so the shortest bar looks much shorter than the longest. Set Minimum to Number and 0 if you want bar length to be in true proportion.
  • Positive bar and Negative bar colours matter when a column can go below zero, such as profit or variance against budget. The Axis colour draws the zero line.
  • Show bar only hides the number and leaves just the bar, which works for a compact visual beside a column that already shows the figure.

Click OK to see both columns formatted together: revenue flagged by rules and units shown as bars.

Let a measure decide the colour with Field value

Rules cover most cases, but they can only test the value you are formatting against fixed ranges. When the colour should depend on something else, such as whether a product hit its own target, write a measure that returns a colour and use the Field value format style.

The measure returns a colour as text, for example a hex code:

DAX
Revenue Colour =
SWITCH (
    TRUE (),
    [Total Revenue] >= [Revenue Target], "#C6EFCE",
    [Total Revenue] >= [Revenue Target] * 0.9, "#FFEB9C",
    BLANK ()
)

Here Total Revenue and Revenue Target stand for measures in your own model. Open the fx dialog for Background color, choose Field value as the Format style, and pick the measure under What field should we base this on?. Returning BLANK() leaves a cell uncoloured. Because the logic is in DAX, the same colour measure can be reused on other tables and charts. Our DAX cheat sheet has the SWITCH(TRUE()) pattern and the other functions you are likely to need.

Beyond tables: icons, font colour and charts

  • Icons use the same Rules dialog, but show a symbol such as a coloured circle or arrow next to the value. They are easier to read than colour alone when a report might be printed in black and white or read by someone who is colour blind.
  • Font color colours the number itself instead of the cell. It is quieter than a background and works well for marking negative values in red.
  • Charts support it too. On a bar or column chart, open the Format pane, expand Bars or Columns, and click the fx button next to Color to get the same Gradient, Rules and Field value options.

Common problems and fixes

  • The colours are on the wrong column. Check Series in the Cell elements card. Each column has its own settings.
  • The Total row has gone a strong colour. Set Apply to to Values only.
  • The colours shift every time a slicer changes. Lowest value, Highest value and Percent rules recalculate on the filtered data. Use Number end points for colours that mean the same thing on every view.
  • No fx button appears. The setting is still switched off. Turn on the switch first, then the fx button becomes available.
  • A rule never fires. Check whether the dropdown says Number or Percent, and whether the range uses < or <= at the boundary.

Take your Power BI reports further

Conditional formatting is one of the quickest ways to make a report easier to read. Building tables, matrices and charts and formatting them for an audience is part of our Power BI Introduction course, and our one-day Power BI Essentials course covers inserting and formatting visuals alongside preparing the data. You can compare every level on our Power BI training courses page, or start with the walkthrough on building your first Power BI dashboard.

Next available dates

Power BI Introduction

Live, instructor-led training with a real trainer. Book a seat on a scheduled date below, or get a quote for your team to run it privately.

  • 17 Dec 2026

    Thursday · Virtual · 2 day

    £825per person + VAT

  • 25 Jan 2027

    Monday · Virtual · 2 day

    £825per person + VAT

  • 18 Feb 2027

    Thursday · Virtual · 2 day

    £825per person + VAT

See 10 more dates and the full outline

Ready to train your team?

Tell us what you need and we'll come back to you with a detailed quote.

  • Tailored contentBuilt around your team's work and skill levels.
  • Flexible schedulingDates and times that suit your team, not ours.
  • Your place or onlineDelivered at your office or virtually.
  • Better value per headOne trainer, one day, your whole team.
  • A dedicated trainerYour team gets all of the trainer's attention.
  • Realistic examplesSample data built around the kind of work your team does.
Get a quote for your team

We reply with available dates and a price for your team. No obligation.

Related Articles

  • Build your first Power BI dashboard: connect your data, build four visuals, see what is happening
    Tips & Tricks

    Build Your First Power BI Dashboard: A Step-by-Step Walkthrough

    A step-by-step walkthrough for building your first Power BI dashboard in the browser: upload a spreadsheet, fix the data types, and build four connected visuals.

  • DAX Cheat Sheet: 32 measures with examples, free printable PDF
    Tips & Tricks

    DAX Cheat Sheet: 32 Measures With Examples

    Thirty-two DAX measures with the formula and the mistake people make with each: the base aggregations, iterators, CALCULATE with every flavour of ALL, time intelligence from year-to-date to rolling twelve months, inactive relationships, variables and SWITCH. Read it on the page, copy any measure, or download the two-page printable PDF. No sign-up.

  • DAX for beginners: the five measures every Power BI report needs - total, ratio, running total, prior year comparison and a filtered total
    Tips & Tricks

    DAX for Beginners: The 5 Measures Every Power BI Report Needs

    Start DAX the practical way: five measures that cover most real Power BI reports, with the formulas explained in plain English.

Insights for modern teams

Stay ahead with our latest learning trends, tools, and success stories. Enter your email address below to receive updates from us.

Future Savvy
© 2026 Future Savvy. All Rights Reserved.

Future Savvy is a trading name of Systematix Limited. Registered in England and Wales, company number 11477692. Registered office: Blackwell House, Guildhall Yard, London EC2V 5AE.