Data Structures & Algorithms

Understanding Conditional Formatting in Power BI Tables and Matrices

While tables and charts are great for displaying data, they may not always convey the most important aspects at a glance. This is where Microsoft Power BI conditional formatting comes into play which enables you to emphasize the data points that meet a specific criteria and make your reports more engaging and informative.

Conditional formatting is a powerful feature in Power BI that allows you to dynamically format the data based on specific rules. This feature enhances the visual appeal and interpretability of your reports and visualizations by highlighting important information and trends.

It enables you to draw attention to outliers, significant values, or data patterns that might otherwise be overlooked. With options like background colors, font colors, data bars, color scales, and icon sets, you can customize the formatting based on your conditions. Multiple rules and priorities can be applied to create complex formatting scenarios.

In this tutorial, we will explore the different aspects of conditional formatting in Power BI, from understanding the available options to creating rules, customizing styles, and applying advanced techniques.

Getting Started with Conditional Formatting

To begin using the conditional formatting in Power BI, follow these simple steps:

Step 1: Load the Data into Your Power BI

Open the Power BI and load your data into the report. This can be done by connecting to various data sources such as databases, spreadsheets, or online services. For this illustration, we use the “Financials” table that comes with Power BI as a sample.

Step 2: Drag and Drop the Parameters from the Fields Section to Columns

Create a basic report or visual where you want to apply the conditional formatting to. This could be a table, chart, or any other visual representation of your data. For instance, we can drag the “Country” field to the “Columns” section.

Step 3: Click on the Conditional Formatting

Once you select the visual or field/column that you want to format, navigate to the “Visualizations” pane on the right side of the Power BI interface. You will find the “Conditional formatting” section in the “Visualizations” pane.

Conditional formatting is applicable for both tables and matrices as indicated in the following figure. Click whichever is applicable for your needs. This is where you can access and apply the various formatting options.

Step 4: Choose the Formatting Type that You Want to Apply

Click on the arrow beside your chosen column before clicking on the “Conditional formatting” section to expand it and view the available formatting options. Depending on the type of visual or field/column, you will see the different options such as “Background color”, “Font color”, “Data bars”, “Color scale”, “Web URL”, and more.

Select the formatting option that you want to apply. For example, if you choose the “Font color”, you can set the rules to change the font color of the visual based on specific conditions.

Step 5: Define Your Formatting Rules

After selecting the formatting option, you can define the rules for conditional formatting. This involves setting the conditions based on values, fields/columns, measures, or expressions. For each rule, you can fine tune the options to meet your visual needs.

Once you are satisfied with the conditional formatting settings, click on the “Apply” or “OK” button to apply the formatting to your visual or field/column.

Step 6: Customize Your Formatting

Customize the formatting style according to your preference. Depending on the selected formatting option, you can choose the colors, gradients, data bar lengths, icon sets, etc. that should be applied when the conditions are met.

As you define the rules and formatting style, you can see a live preview of how the data will be formatted in the visual. This allows you to make adjustments and fine-tune the formatting as needed.

The previous steps will help you to easily get started with conditional formatting in Power BI. It provides a straightforward process to apply the formatting rules and customize the styles based on specific conditions. Experiment with different options and settings to effectively highlight and visualize your data to make your reports more engaging and impactful.

Power BI Conditional Formatting Options

Power BI offers a variety of formatting options that you can apply when using conditional formatting. Let’s explore some of the available key options:

Background Color

This option allows you to change the background color of a visual based on specific conditions. For example, you can highlight the high sales numbers in green and low sales numbers in red to make it easier to identify the performance trends at a glance.

Font Color

With font color formatting, you can dynamically change the text color within a visual based on conditions. This is useful to emphasize the specific data points or draw attention to critical information.

Data Bars

Data bars are horizontal bars that represent the relative magnitude of values within a visual. You can apply the data bars to fields or columns to create a visual comparison and highlight variations. Longer bars can represent the higher values, while shorter bars can represent the lower values.

Color Scale

Color scales allow you to assign colors to the data values based on a gradient. This helps visualize the range and distribution of values within a visual. For instance, you can apply a color scale to a heatmap to show the temperature variations, with the cool colors representing the low values and the warm colors representing the high values.

Icon Sets

Icon sets enable you to display the icons based on predefined conditions. You can use the icons to represent the different states or categories within your data. For example, you can assign the icons such as arrows, checkmarks, or warning signs to indicate positive, neutral, or negative trends.

Rules-Based Formatting

Power BI allows you to create the custom rules for conditional formatting. You can define the conditions using comparison operators like greater than, less than, equal to, between, and more. This gives you the flexibility to apply the formatting based on specific criteria that suit your data analysis needs.

These formatting options can help you to effectively visualize your data and highlight important insights. Remember to select the formatting option that best suits your data and the story that you want to convey.


Dynamically formatting the data based on specific conditions can help you highlight an important information, identify the trends, and draw attention to key insights. This tutorial explored the various aspects of conditional formatting in Power BI, from understanding the available formatting options to creating rules, customizing styles, and applying advanced techniques.

As you may have noted, one of the key advantages of conditional formatting in Power BI is its flexibility. You can format the various elements of your visuals such as background colors, font colors, data bars, color scales, and icon sets based on the conditions you define.

About the author

Kennedy Brian

Brian is a computer scientist with a bias for software development, programming, and technical content development. He has been in the profession since 2015. He reads novels, jogs, or plays table tennis whenever not on gadgets. He is an expert in Python, SQL, Java, and data and network security.