- Today we learn about conditional formatting in Power BI. Conditional formatting is the features of Power BI. We can also display cell values with data bars.
- Firstly we load the table into Power BI using Get Data.
- Next, we drag and drop the table from the visualization pane and select the required field which we want to display in the table.
- After that in Format go to the Conditional Formatting and select the column. Here in the Prod_Cost column, we apply conditional formatting.
- In the conditional format, there are many options for formatting data.
- In conditional formatting, we set the background color according to the minimum and maximum value.
- Here first we turn on the Background color then automatically assign the color to visualization component i.e. table.
- In Advanced Control we customize the color as per user requirement.
- The Format has three option that is Color Scale, Rules and Fields Value.
- We choose Color scale format to set the color for Minimum, Center, and Maximum values. The diverging option helps to set color of center value.
- In summarization as per requirement, we choose an option like Sum, Average, Minimum, Maximum, etc.
- After the click on ok changes is applied to the table.
- To set font color enables the Font color option.
- Advanced controls help to configure the Font color.
- After enabling Font Color we select Format as well as the field. And set the color as per Lowest, Middle and Highest value.
- Then click on ok. Here changes apply to the table.
- Data Bars are helps to format data and to make it easier to compare. Now we set the Data Bars.
- Now we select a column in the Base value field. And select the minimum and maximum values, the color of the bars.
- Bar direction helps to the direction of the bar. If required, there is an option to just display the bars and not the data itself.
- In the following table display the bar according to a minimum and maximum value.
- We apply conditional formatting using Icons on the text columns in Power BI. For applying icon we enable the Icons option.
- Here we select Icon layout as of right. Then we select alignment and style.
- By adding New rules we set the value.
- After clicking ok in the table icons are displayed.
If you are new to Power BI start with the following must-watch video:-