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 a 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 check HTTPS://www.c-sharpcorner.com/article/import-data-into-power-bi-from-csv/) go home tab and click on ‘Get data’ further click on ‘text/csv’. Select the file and click on ‘Open’.
Click on ‘Load’ to import data from CSV.
Your table has now been loaded and shown at the right pane of the tool.
Step 2. In the second step, I will show the data. So, I am selecting the ‘Table’ visualization. To perform conditional formatting ‘Table’ and ‘Matrix’ visuals are most commonly used. So, click on table visuals and select the required column by clicking on the check box of columns.
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 the ‘SalesLastYear’ column. Right-click on it and go to conditional formatting.
Image 1
Image 2
So, always choose the column that has numeric values and you get the sum of that column.
At the first image click on the selected column go to conditional formatting and click on database. A new window will be opened.
Here you can provide minimum and maximum columns manually by selecting a custom value. Select any color for data bars. On 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 uncheck this option you will get bar only.
Click ‘OK’ to apply formatting. Your data will be shown in the below image.
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 easily. In the next article, I will show you how to apply conditional formatting by web URL. Thanks for reading. Have a good day.