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.
Hello! I've read a couple posts about conditional formatting for a stacked bar chart and the only one post was close.
Unfortunately, it's a burden to have to conditionally format using measures, especially because the legend then has to show the those measure values which is less than elegant. I have a chart with budget and remaining stacked. I just want any remaining balances that fall below $0 to be red.
Solved! Go to Solution.
Hello @boyerusmc -
I've done something similar in the past, and it involves making two measures for value that could be negative:
Total Remaining Neg = var __tot = CALCULATE(SUM('Table'[Remaining]))
return IF (__tot < 0, __tot, 0)
Total Remaining Pos = var __tot = CALCULATE(SUM('Table'[Remaining]))
return IF ( __tot >= 0, __tot, 0)
Then rename them after you put them in as values, change the colors, and
I hope this helps,
David
I don't see any conditional format option for stacked bar chart. Can you provide a sample of what do you have now? Or what do you want to achieve.
Regards
Paul
Providing a visual example. I want any bar that falls below $0 to be red.
Sorry - part two: snapshot below shows there's no option for advanced controls / conditional formatting for the data colors.
Hello @boyerusmc -
I've done something similar in the past, and it involves making two measures for value that could be negative:
Total Remaining Neg = var __tot = CALCULATE(SUM('Table'[Remaining]))
return IF (__tot < 0, __tot, 0)
Total Remaining Pos = var __tot = CALCULATE(SUM('Table'[Remaining]))
return IF ( __tot >= 0, __tot, 0)
Then rename them after you put them in as values, change the colors, and
I hope this helps,
David
Thanks David, this worked like a champ!
@boyerusmc , I doubt you can do conditional formatting in stacked chart visual.
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 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |