In this post, we will learn How to perform Conditional Formatting based on string value in Power BI that has been introduced on the Feb 2023 Power BI Feature Summary.
What’s Conditional Formatting in Power BI?
Conditional formatting is a feature in Power BI that allows you to change the appearance of data based on a set of conditions or rules.
This feature helps you to quickly identify trends, patterns, and anomalies in your data by highlighting specific values, cells, or columns that meet certain criteria.
With conditional formatting,
- You can choose from a wide range of formatting options, such as font color, background color, font style, and data bars.
- You can also use icons, such as arrows or circles, to represent different levels of data.
Conditional formatting is particularly useful when you need to visualize large amounts of data and want to highlight specific data points that are important or require attention.
It can be used in various types of visuals, including tables, charts, and matrices, and can help you to create more impactful and insightful reports and dashboards.
Conditional Formatting based on String Value in Power BI
Power BI Team released a new reporting feature related to Conditional Formatting in the Feb 2023 Power BI summary feature updates, which many customers have been asking about, that is you can simply create Conditional Formatting based on String value in Power BI now.
How to create Conditional Formatting based on String Value in Power BI?
Take the following scenario: you have a table that contains the names of departments such as IT, HR, and so on, and these values are displayed in a stacked column bar chart.
Now you need to perform a conditional formatting based on string value on the department column, and you need to do the following:
- If the department name is equal IT, the column bar should be Red.
- If the department name is equal HR, the column bar should be Green.
- Otherwise, it should be the default color.
Currently, performing such a scenario and conditional formatting depending on string value is a piece of cake by doing the following:
- Click on your visual, then click on formatting button in the visualization pane
- Scroll down to “Columns“, then click on “Conditional Formatting” button as shown below.
- Once you click on “Conditional Formatting” button, a new dialog should be opened to perform your rules.
- Now, you can select department column, and add your rules on the string column as you prefer.
Besides the “IS” operators, you can also use the below operators that meet with the string values
Once you built your rules as your need, just click on “Ok” button, to apply the conditional formatting on your visual based on string value as shown below.
Conditional formatting in Power BI is a powerful feature that allows users to format their data visualizations based on certain criteria. By setting rules and conditions for formatting, users can easily highlight important data points and bring attention to areas that require further analysis.
Power BI offers a variety of options for conditional formatting, including data bars, color scales, and icons. Users can also create custom formatting rules using expressions and measures, providing flexibility and customization to their data visualization.
Overall, conditional formatting in Power BI is a valuable tool for enhancing data visualizations and making insights more accessible to users. By allowing users to highlight important data and customize their visualizations, conditional formatting helps users to better understand and analyze their data, leading to more informed decision-making.
In this post, we have introduced the new conditional formatting based on string column value and providing a real example for how to use it.
- You can download the PBIX file from GitHub