Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi ,
How can i make a conditional formatting that is more dynamic , based on ranges?
For example, I would like to have the bar chart to be Green color if the range is "3 - 7 days", Red if range "8 - 15 days" and so on.
Currently I have created the measure to count ticket ids for each ranges as follow.
Ageing(3-7days) = CALCULATE(COUNTROWS('Incident Ageing Report'),'Incident Ageing Report'[Ageing Range]="3 - 7 Days")
If anyone can help me would be much appreciated.
Thanks
Solved! Go to Solution.
Hi @Zaky
Clustered column chart don't have Conditional Formatting function like table or matrix visuals. But you can use Data colors in Format.
Due to I don't know your data model, I build a sample table to have a test.
Ageing Range is a calculated column.
Ageing Range =
IF (
'Incident Ageing Report'[Ageing] >= 3
&& 'Incident Ageing Report'[Ageing] <= 7,
"3-7 Days",
IF (
'Incident Ageing Report'[Ageing] <= 14,
"8-14 Days",
IF (
'Incident Ageing Report'[Ageing] <= 30,
"15-30 Days",
IF (
'Incident Ageing Report'[Ageing] <= 60,
"31-60 Days",
IF ( 'Incident Ageing Report'[Ageing] <= 80, "61-80 Days", ">81 Days" )
)
)
)
)
Then build a Clustered column chart.
You can change Data color by range in Format.
You can download the pbix file from this link: Conditional Formatting
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Zaky
Clustered column chart don't have Conditional Formatting function like table or matrix visuals. But you can use Data colors in Format.
Due to I don't know your data model, I build a sample table to have a test.
Ageing Range is a calculated column.
Ageing Range =
IF (
'Incident Ageing Report'[Ageing] >= 3
&& 'Incident Ageing Report'[Ageing] <= 7,
"3-7 Days",
IF (
'Incident Ageing Report'[Ageing] <= 14,
"8-14 Days",
IF (
'Incident Ageing Report'[Ageing] <= 30,
"15-30 Days",
IF (
'Incident Ageing Report'[Ageing] <= 60,
"31-60 Days",
IF ( 'Incident Ageing Report'[Ageing] <= 80, "61-80 Days", ">81 Days" )
)
)
)
)
Then build a Clustered column chart.
You can change Data color by range in Format.
You can download the pbix file from this link: Conditional Formatting
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Zaky , you can do conditional formatting based on the measure . But I doubt you can do that on Clustered bar visual with a legend or multiple columns.
example
color = if([age]= "30-50" ,"red", "white")
steps - we use it this measure after choosing "Field value" in conditional formatting
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |