Today you will learn how can you implement a traffic light indicator functionality in Power BI.
Power BI allows you to conditionally format a column based on another column value. Traffic Light indicator also works based on a value which is provided in the given column.
I will be implementing the Traffic Light Indicator functionality in the same report which we created while learning Add hyperlinks to CRM record in Power BI.
Let’s get started. You need to add a new column to your dataset as shown in the below image:
Rename the column as “Indicator” for better understanding.
After renaming use a Circle UNICHAR code 11044 next to Indicator for populating a Circle icon in the column.
Indicator = UNICHAR(11044)
Select the table and check the box which appear next to Indicator column under dataset. This will add the Indicator column under report.
The circle under Indicator column will appear in black color.
For enabling the traffic light capability, you need to right click on the Indicator column and select Conditional formatting –> Font color. This will change the Font color of circles.
The below screen will appear, click on Based on field dropdown. Select the column based on which the traffic light indicator would work.
In my case I am going to use Profit %(new_profit) column. Which is the third column in our table.
Go to Diverging and check the box which appear next to it. This will populate a new field “Center” between “Minimum” and “Maximum”.
Select Number value under the dropdown which appear below Minimum, Center and Maximum fields. Provide the number range for the Indicator column based on this the traffic light functionality would work. Then click OK.
Note: The color bar which appear below the Diverging field is totally based on the colors which you select under the Minimum, Center and Maximum fields.
Note: I have taken the minimum number as 0 which mean the number which appear nearest to 0 under Profit % column will appear as brightest red and the number which is nearest to 70 will appear the brightest yellow. The number which appear somewhat near 50 will be a mix of Red and Yellow color.
Now, you have got the functionality that you wanted. The Indicator column appear as a Traffic Light Indicator.