Free Power BI Conditional Formatting Rule Builder
Pick your measure, set two thresholds, and get a ready-to-paste color-returning DAX measure plus the exact Format-pane steps to apply it — red/amber/green banding for a table or matrix, done correctly the first time. Instant, no signup.
Preview
DAX measure to paste
Apply it in the Format pane
Why a measure, not the built-in rules dialog
Power BI's own "Background color > Format style: Rules" works for simple fixed bands, but a field-value measure is more flexible and easier to reuse across visuals: write the logic once, bind it anywhere that visual type supports field-value formatting, and change the bands later by editing one DAX measure instead of re-opening the Rules dialog on every visual.
Boundary semantics, exactly
Each row only ever matches one band: the first threshold is a strict <, never <= on both sides of a boundary — the same "equals sign on only one side" rule that matters for date-range filters applies here too, so a value sitting exactly on a threshold never double-counts or falls through a gap.
What this covers, and what it doesn't
This generates field-value background/font color formatting for a table or matrix — the most common case. Cards, KPI visuals, and icon-based conditional formatting use different, more limited Format-pane options not covered here. For understanding the generated DAX itself, the DAX explainer breaks down what each part does.
Questions
Is this free?
Yes, completely free, no account or signup needed.
Does this work on cards or KPI visuals?
Not directly — this generates field-value formatting for a table or matrix's background/font color. Cards and KPI visuals expose conditional formatting differently (often just a single color rule, not a field-value measure), so the generated measure itself is still useful there, but the setup steps above are specific to tables and matrices.
Why three colors instead of a smooth gradient?
Three fixed bands are easier to read at a glance and easier to reason about than a gradient, and they map directly to a SWITCH-based DAX measure. Power BI's built-in "Color scale" rule type already covers smooth gradients if that's what you want instead.
Can I use my own colors instead of red/amber/green?
Yes — the generated DAX is plain hex color strings. Swap any of the three (or the blank-value color) for your own hex code before pasting.
What happens to blank values?
They get their own neutral gray, checked first in the measure, so a missing value is never silently miscategorized into the worst (or best) band.
Skip the manual setup for your first draft.
Upload your data, describe what you want, and get back a real, editable .pbip project today — free, no Fabric or Copilot license needed.
More free tools: DAX formula generator · DAX explainer · theme generator · see all →