Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi
Does anyone have a way to conditionally format bar chart columns based on another fields value?
I would like the colours to be Red and Green based on whether the sum is greater than a target value.
The issue is the target values have changed over time and not static
Essentially i want to do;
If month value > target value = green
If month value < target value = red
I'm sure im missing an easy way to do this but i'm struggling!!
Solved! Go to Solution.
Hi @Anonymous
You need to create a measure that sets a color value based on the Target value, presumably this is a measure.
With that done, you can use the new color measure to set conditional formatting on the columns/bars
Measure to set color based on target value. I'm using Hex color codes, #0F0 is green, #F00 is red.
Column Color = IF(SUM('DataTable'[Value]) >= [Target], "#0F0", "#F00")
Then apply a CF rule
Regards
Phil
Proud to be a Super User!
Hi all,
Thanks for the discussion and the answer to this topic.
I'm currently trying to do a conditional formatting for a similiar use-case.
I have two bars in a clustered column chart, first is the achieved number, 2nd bar is the target number.
I would like to add the following conditional formatting: if the achieved number is smaller than the target number, the achieved number bar should be red. Otherwise, the achieved target number bar will be green.
Both bars should be visible in the clustered column chart.
I setup the measure which does exactly this:
If you can starrt a new topic and attach your PBIX file that'll make it easier to help you.
Regards
Phil
Proud to be a Super User!
Excellent, i new it would be a simple solution!
Hi @Anonymous
You need to create a measure that sets a color value based on the Target value, presumably this is a measure.
With that done, you can use the new color measure to set conditional formatting on the columns/bars
Measure to set color based on target value. I'm using Hex color codes, #0F0 is green, #F00 is red.
Column Color = IF(SUM('DataTable'[Value]) >= [Target], "#0F0", "#F00")
Then apply a CF rule
Regards
Phil
Proud to be a Super User!
Seems this answer was issued for Power BI version 1.9 or so, an seems not to be available in version 2.130 anymore (or it has been moved into another place?) So far I wasn't able to find it.
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
88 | |
83 | |
76 | |
49 |
User | Count |
---|---|
145 | |
140 | |
109 | |
68 | |
55 |