Forum Discussion
Get conditional Bar Chart Colors for a variable value.
Hello Power-Bi Community,
sorry if there is an obvious solution i am quite new.
I have 2 values in my data which show calls and expected calls. Both are changing with the selected timeframe and employee etc.
I want the bars in the chart to be green if the calls are >= expected calls, and red otherwise.
While searching the forums i think i need to define a new meassure but i am quite unsure about how to do that exactly and what syntax to use.
Thank you for the help
JW
The measure you need is something like
Conditional Colors = INT( SUM( 'Yor Table'[calls] ) >= SUM( 'Yor Table'[expected calls] ) )
Later you can use it for conditional formatting like on scr below.
This will give you the following result.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
7 Replies
- MariuszCommunity Champion
The measure you need is something like
Conditional Colors = INT( SUM( 'Yor Table'[calls] ) >= SUM( 'Yor Table'[expected calls] ) )
Later you can use it for conditional formatting like on scr below.
This will give you the following result.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.- JonasWillmannNew Member
Thank you!
Works like a charm
- MariuszCommunity Champion