Conditional Formatting By Data Bar In Power BI

In previous articles I have done conditional formatting by background color, font color and Icons. In this article I will show you how to perform conditional formatting by data bars. You can represent cell values with data bars. Reports with Data bar are easy to understand by someone who doesn’t even know much about the Power Bi tool.
 
Below are the steps for conditional formatting by data bars. First, I will import the data from the source. As you know Power Bi supports many sources so, you can choose any one  you want. I am going to import data from CSVs.
 
Step 1
 
To import data from csv (know more checkhttps://www.c-sharpcorner.com/article/import-data-into-power-bi-from-csv/) go to home tab and click on ‘Get data’ further click on ‘text/csv’. Select the file and click on ‘Open’.
 
Conditional Formatting By Data Bar In Power BI 
 
Click on ‘Load’ to import data from CSV.
 
Conditional Formatting By Data Bar In Power BI 
 
Your table has now been loaded and shown at the right pane of the tool.
 
Conditional Formatting By Data Bar In Power BI 
 
Step 2
 
In the second step I will show the data. So, I am selecting ‘Table’ visualization. To perform conditional formatting ‘Table’ and ‘Matrix’ visual are most commonly used. So, click on table visuals and select required column by click on check box of columns.
 
Conditional Formatting By Data Bar In Power BI 
 
Step 3
 
Now choose any column on which you want to apply conditional formatting. Remember, the column you select, should be on ‘Sum’, if you checked it as ‘Don’t summarize’ you won’t get data bar option in conditional formatting. Check the below image to see the difference,
 
In both conditions I have selected ‘SalesLastYear’ column. Right click on it and go to conditional formatting.
 
Image 1
 
Conditional Formatting By Data Bar In Power BI 
 
Image 2
 
Conditional Formatting By Data Bar In Power BI 
 
So, always choose the column that has numeric values and you get the sum of that column.
 
At the  first image right click on selected column and go to conditional formatting and click on databar. A new window will be opened.
 
Conditional Formatting By Data Bar In Power BI 
 
Here you can provide minimum and maximum column manually by selecting custom value. Select any color for data bars. In the above page you can see that I have unchecked the option ‘Show Bar Only’. Now I will get the bar on that column with values. If you unchecked this option you will get bar only.
 
Click ‘Ok’ to apply formatting. Your data will be shown as the below image.
 
Conditional Formatting By Data Bar In Power BI 
 
This is the way to apply conditional formatting by data bars.
 

Summary

 
HI hope you understand the above steps and it will help you to represent your data in an easy manner. In the next article I will show you how to apply conditional formatting by web URL. Thanks for reading. Have a good day.