
Power BI Conditional Formatting: Complete Guide with Examples
Master Power BI conditional formatting with this comprehensive guide covering background colors, font colors, data bars, icons, gradient colors, DAX-based rules, dynamic format strings, and enterprise design patterns for tables, matrices, cards, and KPIs.
<h2>Why Conditional Formatting Is Essential for Enterprise Power BI</h2>
<p>Conditional formatting transforms static Power BI reports into dynamic, insight-driven dashboards that surface anomalies, highlight performance thresholds, and guide executive decision-making without requiring users to manually scan rows of data. In enterprise environments where dashboards display hundreds or thousands of data points across financial, operational, and compliance metrics, conditional formatting is not a cosmetic enhancement—it is a critical communication tool that determines whether stakeholders can identify issues in seconds rather than minutes.</p>
<p>Our <a href="/services/power-bi-consulting">Power BI consulting</a> team implements conditional formatting strategies for Fortune 500 organizations across <a href="/industries/healthcare-consulting">healthcare</a>, <a href="/industries/financial-services-consulting">financial services</a>, and <a href="/industries/government-consulting">government</a> sectors. This guide covers every conditional formatting capability in Power BI, from basic background colors to advanced DAX-driven dynamic format strings, with enterprise design patterns and production-ready examples.</p>
<h2>Background Color Formatting</h2>
<p>Background color formatting is the most widely used conditional formatting feature. It changes the cell background color in tables and matrices based on data values, making it immediately obvious which values fall above, below, or within target ranges.</p>
<h3>By Rules (Discrete Thresholds)</h3>
<p>Rule-based background colors apply specific colors when values meet defined conditions. This approach is ideal when your organization has explicit thresholds—profit margins above 20% are green, between 10-20% are yellow, below 10% are red:</p>
<ol> <li>Select a table or matrix visual in your report.</li> <li>In the Visualizations pane, navigate to the column you want to format.</li> <li>Click the dropdown arrow next to the field and select <strong>Conditional formatting > Background color</strong>.</li> <li>In the dialog, select <strong>Format style: Rules</strong>.</li> <li>Define your rules: for example, if the value is greater than or equal to 20, apply green (#107C10). If the value is between 10 and 19.99, apply yellow (#FFB900). If the value is less than 10, apply red (#D13438).</li> <li>Click OK to apply.</li> </ol>
<p>Enterprise consideration: Use your organization's standard RAG (Red/Amber/Green) color palette for consistency across all reports. Document threshold values in a central style guide so every report author applies the same business rules. Our <a href="/services/power-bi-architecture">Power BI architecture</a> team establishes formatting standards as part of enterprise deployment governance.</p>
<h3>By Field Value (Data-Driven Colors)</h3>
<p>Field value formatting uses a column or measure in your data model to directly specify colors. This is powerful when color assignments come from business logic in your data source rather than static rules:</p>
<ol> <li>Create a column or measure in your model that returns color hex codes (e.g., a DAX measure that returns "#107C10" for on-track, "#D13438" for off-track).</li> <li>In the conditional formatting dialog, select <strong>Format style: Field value</strong>.</li> <li>Choose the measure or column that contains the color codes.</li> </ol>
<p>This approach decouples formatting logic from the report and centralizes it in the data model, which is essential for enterprise environments where multiple reports must apply consistent formatting rules. When thresholds change (e.g., a new fiscal year adjusts the target margin from 20% to 22%), you update the DAX measure once, and all reports using that measure update automatically.</p>
<h3>By Gradient (Color Scales)</h3>
<p>Gradient formatting applies a smooth color transition across a range of values, similar to a heat map. This is most effective for continuous numerical data where discrete thresholds are not meaningful—such as employee engagement scores, customer satisfaction ratings, or normalized performance indices:</p>
<ol> <li>In the conditional formatting dialog, select <strong>Format style: Gradient</strong>.</li> <li>Define the minimum, center (optional), and maximum colors.</li> <li>Choose whether values are based on the lowest/highest values in the visual, specific numeric values, or percentiles.</li> </ol>
<p>For enterprise dashboards, gradients work exceptionally well in matrix visuals displaying heat maps—for example, a matrix with regions on rows, months on columns, and a revenue measure colored on a red-to-green gradient instantly reveals seasonal and geographic performance patterns.</p>
<h2>Font Color Formatting</h2>
<p>Font color formatting changes the text color of values in table and matrix cells. It follows the same three format styles as background color (rules, field value, gradient) but modifies the text rather than the cell background. Font color formatting is often more subtle than background color and is preferred when:</p>
<ul> <li>The report design uses a clean, white-background aesthetic where colored backgrounds would be visually heavy.</li> <li>You need to layer font color on top of background color for double-encoded formatting (e.g., red background + bold white text for critical alerts).</li> <li>Values are positive/negative numbers where green text for positive and red text for negative is the established convention.</li> </ul>
<p>A common DAX pattern for font color by field value:</p>
<pre><code>Font Color Measure = IF( [Profit Margin] >= 0.20, "#107C10", IF( [Profit Margin] >= 0.10, "#FFB900", "#D13438" ) )</code></pre>
<p>Apply this measure as the font color field value, and text colors update dynamically as underlying data changes.</p>
<h2>Data Bars</h2>
<p>Data bars render horizontal bar charts within table and matrix cells, providing an in-cell visual representation of relative magnitude. Data bars are one of the most effective conditional formatting options for financial and operational reports because they communicate both the value (the number in the cell) and the relative proportion (the bar length) simultaneously.</p>
<h3>Configuring Data Bars</h3>
<ol> <li>Select the column in the table or matrix visual.</li> <li>Open <strong>Conditional formatting > Data bars</strong>.</li> <li>Configure the positive bar color, negative bar color (if applicable), bar direction, minimum and maximum values, and whether to show the bar only or the bar plus the value.</li> </ol>
<h3>Enterprise Data Bar Patterns</h3>
<ul> <li><strong>Budget variance</strong>: Use bidirectional data bars with green for positive variance (under budget) and red for negative variance (over budget). The bar length shows the magnitude of the deviation.</li> <li><strong>Sales pipeline</strong>: Apply data bars to opportunity amounts in a pipeline table, giving sales managers an instant visual of deal sizes without needing a separate chart.</li> <li><strong>Completion tracking</strong>: For percentage columns (0-100%), data bars provide a progress-bar effect showing how close each item is to completion.</li> <li><strong>Year-over-year growth</strong>: Bidirectional data bars effectively communicate both growth (positive bars extending right) and decline (negative bars extending left).</li> </ul>
<h2>Icons (Conditional Formatting with Icon Sets)</h2>
<p>Icon formatting places small indicator icons (arrows, flags, shapes, traffic lights) in table and matrix cells based on value rules. Icons are particularly effective for executive dashboards where stakeholders need to assess status at a glance without reading numbers:</p>
<ol> <li>Open <strong>Conditional formatting > Icons</strong> for the target column.</li> <li>Select an icon set (directional arrows, shapes, indicators, flags, ratings).</li> <li>Define rules that map value ranges to specific icons. For example: green up-arrow for values above target, yellow sideways-arrow for values within 5% of target, red down-arrow for values below target.</li> <li>Choose icon position: left of the value, right of the value, or icon only (hiding the number).</li> </ol>
<p>Icon-only formatting (hiding the number) is useful in executive summary matrices where each cell represents a KPI status—stakeholders see a grid of green checkmarks, yellow warnings, and red crosses without number clutter. Detailed values are available via drill-through to a detail page.</p>
<h2>Web URL Formatting</h2>
<p>Web URL conditional formatting converts text values in table and matrix cells into clickable hyperlinks. This is configured by toggling the <strong>Web URL</strong> option in conditional formatting and specifying a column or measure that contains URLs:</p>
<ul> <li><strong>Link to detail pages</strong>: A project management dashboard can include a URL column that links each project row to its detailed SharePoint site or project portal.</li> <li><strong>Link to external documentation</strong>: Compliance dashboards can link audit findings to the corresponding remediation tickets in ServiceNow or Jira.</li> <li><strong>Dynamic report links</strong>: Use DAX to construct Power BI report URLs with filter parameters, enabling drill-through across workspaces by clicking a cell.</li> </ul>
<p>For organizations using <a href="/services/sharepoint-consulting">SharePoint</a> alongside Power BI, web URL formatting enables seamless navigation between Power BI dashboards and SharePoint document libraries, lists, or pages.</p>
<h2>DAX-Based Conditional Formatting</h2>
<p>The most powerful conditional formatting in Power BI is driven by DAX measures. Instead of relying on the built-in formatting dialog's limited rule options, you write DAX measures that return color hex codes, and then reference those measures in the field value formatting option. This approach provides unlimited flexibility:</p>
<h3>Multi-Condition Color Measures</h3>
<pre><code>KPI Status Color = VAR _Actual = [Actual Revenue] VAR _Target = [Target Revenue] VAR _Variance = DIVIDE(_Actual - _Target, _Target, 0) VAR _Trend = [Revenue MoM Growth] RETURN SWITCH( TRUE(), _Variance >= 0.10 && _Trend > 0, "#107C10", _Variance >= 0 && _Trend > 0, "#4CAF50", _Variance >= 0 && _Trend <= 0, "#FFB900", _Variance >= -0.10, "#FF9800", "#D13438" )</code></pre>
<p>This measure considers both the variance from target AND the month-over-month trend, providing four-level status indication that a simple rules-based format cannot achieve. A region might be above target (green) but with a declining trend (amber), which is an early warning signal that static threshold formatting would miss.</p>
<h3>Context-Aware Formatting</h3>
<p>DAX measures have access to the full filter context, enabling formatting that adapts to user interactions:</p>
<pre><code>Dynamic Background = VAR _SelectedMetric = SELECTEDVALUE(MetricSelector[Metric]) VAR _Value = [Dynamic Metric Value] RETURN SWITCH( _SelectedMetric, "Revenue", IF(_Value > 1000000, "#107C10", "#D13438"), "Margin", IF(_Value > 0.15, "#107C10", "#D13438"), "Count", IF(_Value > 500, "#107C10", "#D13438"), "#FFFFFF" )</code></pre>
<p>When combined with <a href="/blog/power-bi-field-parameters-dynamic-reports-guide-2026">field parameters</a>, this pattern allows a single visual to display different metrics with appropriate conditional formatting thresholds for each metric—revenue uses dollar thresholds, margins use percentage thresholds, counts use volume thresholds.</p>
<h2>Conditional Formatting on Cards and KPIs</h2>
<p>Cards and KPI visuals support a subset of conditional formatting options. For card visuals, you can conditionally format the font color of the displayed value and the background color of the card. This is controlled through the Format pane under Callout value > Color > Conditional formatting (fx button).</p>
<h3>Card Formatting Patterns</h3>
<ul> <li><strong>Revenue card</strong>: Green font when above target, red when below—the single number on the card immediately communicates status.</li> <li><strong>Background pulse</strong>: Change the card background to a light red wash when a critical metric breaches a threshold, drawing executive attention during board presentations.</li> <li><strong>Comparison cards</strong>: Use DAX measures that compare current period to prior period and return colors accordingly. A set of four cards (Revenue, Margin, Customers, NPS) each independently colored based on their respective trends.</li> </ul>
<h3>KPI Visual Formatting</h3>
<p>The KPI visual has built-in color direction settings (good is high vs. good is low) and automatically applies red/green based on whether the value is above or below the target. For more control, replace the built-in KPI visual with a card or multi-row card using DAX-driven conditional formatting, which provides full color customization instead of the limited built-in red/green palette.</p>
<h2>Conditional Formatting on Tables and Matrices</h2>
<p>Tables and matrices are the primary canvas for conditional formatting because they expose the most formatting options. Every formatting type (background color, font color, data bars, icons, web URL) is available on table and matrix columns. Matrices additionally support formatting on row headers, column headers, and subtotal/total rows.</p>
<h3>Matrix-Specific Formatting</h3>
<ul> <li><strong>Heat map matrix</strong>: Apply gradient background colors to the values area of a matrix with regions on rows and time periods on columns. This creates a heat map that instantly reveals patterns—which regions are consistently strong (dark green), which are declining (shifting from green to red over time), and which have seasonal patterns (alternating colors).</li> <li><strong>Subtotal formatting</strong>: Apply different formatting rules to subtotal and grand total rows than to detail rows. Subtotals might use bold font with a light gray background while detail rows use the standard RAG color scheme.</li> <li><strong>Row-level highlighting</strong>: Use a DAX measure that evaluates whether the current row meets a specific condition (e.g., is this the current user's department?) and returns a highlight color, enabling personalized dashboards where each user sees their relevant data highlighted.</li> </ul>
<h2>Dynamic Format Strings (Power BI Format Expressions)</h2>
<p>Dynamic format strings, introduced as a modern Power BI feature, allow you to write DAX expressions that control the display format of a measure dynamically. Unlike conditional formatting (which changes colors), dynamic format strings change how the number itself is displayed—currency symbols, decimal places, percentage signs, and custom text.</p>
<h3>How Dynamic Format Strings Work</h3>
<p>You define a format expression on a measure in the model view. The format expression is a DAX expression that returns a format string:</p>
<pre><code>-- On the measure "Dynamic Metric Value", set the Format expression to: VAR _SelectedMetric = SELECTEDVALUE(MetricSelector[Metric]) RETURN SWITCH( _SelectedMetric, "Revenue", "$#,##0", "Margin", "0.0%", "Count", "#,##0", "Growth", "+0.0%;-0.0%", "#,##0" )</code></pre>
<p>When a user selects "Revenue" from a field parameter slicer, the measure displays as "$1,234,567". When they select "Margin", the same visual displays "15.3%". The format changes dynamically based on context without creating separate measures for each metric.</p>
<h3>Enterprise Use Cases for Dynamic Format Strings</h3>
<ul> <li><strong>Multi-currency reports</strong>: Display values in the user's local currency with the appropriate symbol ($ for USD, £ for GBP, € for EUR) based on a currency slicer or the user's profile.</li> <li><strong>Variance formatting</strong>: Show positive variances with a "+" prefix and green color, negative variances with a "-" prefix and red color, using format strings like "+#,##0;-#,##0;0".</li> <li><strong>Conditional precision</strong>: Display large values in millions with one decimal ("$1.2M") and small values in full ("$45,678") using DAX logic in the format expression.</li> <li><strong>Status text</strong>: Return text format strings like "On Track" or "At Risk" instead of numbers, effectively turning a numeric measure into a status indicator.</li> </ul>
<h2>Enterprise Design Patterns for Conditional Formatting</h2>
<p>Applying conditional formatting effectively at enterprise scale requires governance, consistency, and restraint. Our <a href="/services/power-bi-architecture">Power BI architecture</a> engagements establish formatting standards as part of the broader <a href="/blog/power-bi-workspace-strategy-organizing-enterprise-2026">workspace governance strategy</a>.</p>
<h3>Centralized Formatting Measures</h3>
<p>Create a dedicated "Formatting" display folder in your semantic model that contains all color measures, format string expressions, and icon logic. This centralizes formatting logic in one place rather than scattering it across individual visuals:</p>
<ul> <li>Revenue Status Color (used across 15 reports)</li> <li>Margin Status Color (used across 12 reports)</li> <li>Growth Trend Color (used across 8 reports)</li> <li>Universal RAG Color (general-purpose three-level status)</li> </ul>
<p>When the CFO decides that the "warning" threshold should shift from 10% to 12%, you update one measure, and every report referencing that measure updates on next refresh.</p>
<h3>Color Palette Standards</h3>
<p>Define a conditional formatting color palette in your enterprise style guide:</p>
<table> <thead><tr><th>Status</th><th>Background Hex</th><th>Font Hex</th><th>Use Case</th></tr></thead> <tbody> <tr><td>Critical / Below Target</td><td>#FDE7E9</td><td>#D13438</td><td>Metrics significantly below threshold</td></tr> <tr><td>Warning / Near Target</td><td>#FFF4CE</td><td>#FFB900</td><td>Metrics approaching threshold</td></tr> <tr><td>On Track / Above Target</td><td>#DFF6DD</td><td>#107C10</td><td>Metrics meeting or exceeding target</td></tr> <tr><td>Neutral / No Status</td><td>#F3F2F1</td><td>#323130</td><td>Informational, no evaluation needed</td></tr> <tr><td>Highlight / Selected</td><td>#DEECF9</td><td>#0078D4</td><td>User-selected or current period</td></tr> </tbody> </table>
<p>Using light pastel backgrounds with saturated font colors ensures readability and accessibility. Avoid using fully saturated backgrounds (bright red, bright green) as they reduce text readability and create visual fatigue on data-dense dashboards.</p>
<h3>Accessibility Considerations</h3>
<p>Approximately 8% of men and 0.5% of women have some form of color vision deficiency. Enterprise dashboards must be accessible:</p>
<ul> <li><strong>Never rely solely on color</strong>: Combine color with icons, text labels, or data bars so color-blind users can still interpret status.</li> <li><strong>Use the blue-orange palette</strong> as an alternative to red-green for users with red-green color blindness (deuteranopia/protanopia).</li> <li><strong>Ensure contrast ratios</strong>: Background-to-font color contrast must meet WCAG 2.1 AA standards (minimum 4.5:1 for normal text).</li> <li><strong>Test with color blindness simulators</strong>: Tools like the Coblis Color Blindness Simulator help verify that your formatting is interpretable for all users.</li> </ul>
<h3>Performance Considerations</h3>
<p>Conditional formatting measures add DAX query overhead because they are evaluated for every cell in a visual. For tables and matrices with thousands of rows:</p>
<ul> <li><strong>Keep formatting measures simple</strong>: Avoid nested CALCULATE or iterator functions in color measures. Simple IF/SWITCH patterns are evaluated efficiently.</li> <li><strong>Avoid formatting measures that reference other formatting measures</strong>: Each level of measure reference adds query complexity.</li> <li><strong>Use variables (VAR)</strong>: Calculate values once in variables and reference them in the SWITCH/IF logic rather than recalculating.</li> <li><strong>Limit formatted columns</strong>: Not every column needs conditional formatting. Apply formatting only to the 2-3 columns that communicate the most important insights. Use <a href="/blog/power-bi-performance-optimization-2025">performance optimization</a> techniques to monitor query times.</li> </ul>
<h2>Combining Conditional Formatting Types</h2>
<p>Power BI allows layering multiple conditional formatting types on a single column. A column can simultaneously have background color, font color, icons, and data bars applied. However, layering should be done judiciously:</p>
<h3>Effective Combinations</h3>
<ul> <li><strong>Background color + icon</strong>: Use a pastel background for the broad status category and an icon for the specific directional trend (up arrow on green background = above target and improving).</li> <li><strong>Data bar + font color</strong>: The data bar shows relative magnitude while the font color indicates status (green value with a long bar = high and on target).</li> <li><strong>Background color + dynamic format string</strong>: The background communicates status while the format string displays the value in context-appropriate formatting.</li> </ul>
<h3>Combinations to Avoid</h3>
<ul> <li><strong>Background color + font color + icon + data bar</strong> on the same column: Visual overload makes cells unreadable. Limit to two formatting types per column maximum.</li> <li><strong>Gradient background + data bars</strong>: Both communicate relative magnitude, creating redundancy. Choose one.</li> <li><strong>Multiple competing color schemes</strong>: If one column uses red-yellow-green and an adjacent column uses blue-orange-purple, the visual becomes confusing. Use consistent palettes across columns.</li> </ul>
<h2>Conditional Formatting in Power BI Paginated Reports</h2>
<p>Power BI paginated reports (SSRS-based) support conditional formatting through expression-based properties. Every visual property (background color, font color, font weight, visibility) can be controlled by an expression:</p>
<pre><code>=IIF(Fields!ProfitMargin.Value >= 0.20, "Green", IIF(Fields!ProfitMargin.Value >= 0.10, "Gold", "Red"))</code></pre>
<p>Paginated report formatting is applied at render time and works consistently across PDF, Excel, Word, and print outputs—a critical requirement for compliance reports in <a href="/industries/healthcare-consulting">healthcare</a> and <a href="/industries/financial-services-consulting">financial services</a> where formatted reports must be archived as regulatory evidence.</p>
<h2>Real-World Enterprise Examples</h2>
<h3>Healthcare: Patient Safety Dashboard</h3>
<p>A hospital network uses conditional formatting on a patient safety matrix with departments on rows and safety metrics (fall rates, infection rates, medication errors) on columns. Background gradient formatting highlights departments with elevated rates. Icon formatting shows trend direction (improving/worsening). Font color on the values emphasizes metrics that breach regulatory reporting thresholds. Dynamic format strings display rates per 1,000 patient days with appropriate precision. This dashboard is reviewed in daily safety huddles and has reduced average time to identify and respond to safety trends from 72 hours to under 4 hours.</p>
<h3>Financial Services: Portfolio Risk Monitor</h3>
<p>An investment firm applies conditional formatting to a portfolio risk matrix with asset classes on rows and risk metrics (VaR, Sharpe ratio, drawdown, volatility) on columns. Background colors use a diverging palette centered on the benchmark, with blue for outperformance and orange for underperformance. Data bars on exposure columns show relative position sizes. Web URL formatting links each asset to its Bloomberg or Reuters detail page. DAX-based formatting measures adjust thresholds based on the current market regime (bull/bear/neutral), so what counts as "high volatility" changes with market conditions.</p>
<h3>Government: Grant Compliance Tracker</h3>
<p>A government agency tracks grant compliance across hundreds of grant recipients using a table with conditional formatting. Background color on the compliance score column uses RAG colors with thresholds defined by federal regulation. Icon formatting on the submission status column shows checkmarks for on-time, warning triangles for approaching deadline, and red crosses for overdue. Font color on the spending column highlights recipients who have spent less than 25% of their allocation (underspend risk) or more than 90% (overspend risk) in the current fiscal year.</p>
<h2>Best Practices Summary</h2>
<ol> <li><strong>Establish formatting standards before building reports</strong>: Define color palettes, thresholds, and icon conventions in your enterprise Power BI style guide.</li> <li><strong>Centralize formatting logic in DAX measures</strong>: Create dedicated formatting measures in a display folder so all reports use the same business rules.</li> <li><strong>Use field value formatting over rules formatting</strong> for any formatting that might change or that is used across multiple reports—DAX measures are easier to maintain than visual-level rules.</li> <li><strong>Limit formatting to 2 types per column</strong>: More than two simultaneous formatting types creates visual clutter.</li> <li><strong>Ensure accessibility</strong>: Combine color with icons or text. Test with color blindness simulators. Maintain WCAG contrast ratios.</li> <li><strong>Monitor performance</strong>: Test formatted reports with production data volumes. Simplify formatting measures that cause query degradation.</li> <li><strong>Document formatting decisions</strong>: Record which measures drive formatting, what thresholds are used, and why specific colors were chosen.</li> <li><strong>Use dynamic format strings</strong> for multi-metric reports to ensure numbers are always displayed in the appropriate format.</li> </ol>
<p><a href="/contact">Contact EPC Group</a> to discuss your conditional formatting strategy. Our <a href="/services/power-bi-consulting">Power BI consulting</a> and <a href="/services/power-bi-architecture">Power BI architecture</a> teams design enterprise formatting standards, build centralized DAX formatting measure libraries, implement accessible color palettes, and optimize formatted reports for performance across large-scale Power BI deployments.</p>
Frequently Asked Questions
What is the difference between rule-based and field value conditional formatting in Power BI?
Rule-based conditional formatting defines color or icon assignments directly in the visual formatting dialog using static threshold values (e.g., if value is greater than 100, apply green). Field value formatting uses a column or DAX measure in your data model that returns color hex codes, icon indices, or format strings, and the visual reads those values to determine formatting. Rule-based formatting is simpler to configure for one-off visuals but becomes difficult to maintain across many reports because rules are embedded in each visual and must be updated individually. Field value formatting centralizes formatting logic in the data model—a single DAX measure defines the business rules, and every visual referencing that measure inherits the same formatting. For enterprise deployments with dozens or hundreds of reports, field value formatting (driven by DAX measures) is the recommended approach because it provides centralized maintenance, version control through deployment pipelines, and consistency across all reports.
How do I apply conditional formatting to card visuals in Power BI?
Card visuals support conditional formatting for the callout value font color and the card background color. To configure it, select the card visual, go to the Format pane, expand the Callout value section, click the color property, and select the fx (conditional formatting) button. You can then choose rules-based or field value formatting. For field value formatting, create a DAX measure that returns a hex color code based on your business logic (e.g., green when revenue exceeds target, red when below) and select that measure as the field value source. Card visuals do not support data bars or icons. For more advanced card formatting—such as displaying an icon alongside the value or applying gradient backgrounds—consider using a single-cell matrix or a custom visual like the Power KPI or Charticulator custom visual, which provide richer formatting options than the native card visual.
Can I use conditional formatting with dynamic format strings in Power BI?
Yes, dynamic format strings and conditional formatting are complementary features that work independently on the same measure. Dynamic format strings (format expressions) control how a number is displayed—currency symbols, decimal places, percentage signs, custom text—while conditional formatting controls the visual appearance of the cell—background color, font color, icons, data bars. You can apply both simultaneously: a measure can have a format expression that switches between "$#,##0" and "0.0%" based on a slicer selection, AND have conditional formatting that colors the value green or red based on performance. The format expression is defined on the measure in the model view (Data pane > select measure > Format expression in the properties), while conditional formatting is configured on the visual in the Visualizations pane. Together, they enable fully dynamic reports where a single visual changes both its number formatting and its color formatting based on user context.
How does conditional formatting impact Power BI report performance?
Conditional formatting adds DAX query overhead because each formatting rule generates additional queries that Power BI must evaluate for every visible cell. For a table with 500 rows and conditional formatting on 3 columns, Power BI evaluates the formatting measure 1,500 times per render. The performance impact depends on the complexity of the formatting measures: simple IF or SWITCH statements with direct column references are evaluated quickly by the VertiPaq engine. Complex measures that use CALCULATE, iterators (SUMX, FILTER), or reference other measures create nested query chains that significantly increase evaluation time. To minimize performance impact: use VAR statements to calculate values once and reference them multiple times in SWITCH logic; avoid iterator functions in formatting measures; limit conditional formatting to the 2-3 most important columns rather than formatting every column; and test with production data volumes using Performance Analyzer in Power BI Desktop to identify slow-rendering visuals. For large tables, consider paginating (showing 20-50 rows at a time) to reduce the number of cells that need formatting evaluation on each render.
What are the best practices for conditional formatting accessibility in enterprise Power BI reports?
Enterprise Power BI reports must be accessible to users with color vision deficiency, which affects approximately 8% of men and 0.5% of women. The primary best practice is to never rely on color alone to communicate information—always pair color with a second indicator such as icons (arrows, checkmarks, warning triangles), text labels (On Track, At Risk, Critical), or data bars. Use the blue-orange diverging palette as an alternative to red-green for heat maps and status indicators, as it is distinguishable by users with the most common form of color blindness (deuteranopia). Ensure that background-to-font color contrast ratios meet WCAG 2.1 AA standards (minimum 4.5:1 for normal text, 3:1 for large text). Avoid using fully saturated background colors (pure red, pure green) which reduce text readability—instead use pastel backgrounds (light red, light green) with dark saturated font colors. Test your reports with color blindness simulation tools such as Coblis or the built-in Windows Color Filters accessibility feature. Document your accessible formatting palette in your enterprise Power BI style guide and include accessibility review as a step in your report publishing approval process.