Forum Discussion
boyerusmc
6 years agoFrequent Visitor
Stacked bar chart formatting
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, esp...
- 6 years ago
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
boyerusmc
6 years agoFrequent Visitor
Sorry - part two: snapshot below shows there's no option for advanced controls / conditional formatting for the data colors.
dedelman_clng
6 years agoCommunity Champion
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
- boyerusmc6 years agoFrequent Visitor
Thanks David, this worked like a champ!