Forum Discussion
Highlight the max value in a chart /visual
please I need your help I am trying to highlight the max value of the sales amount by using the code below but it doesn't work
any ideas.
The syntax for 'VAR' is incorrect. (DAX(VAR Maxsales=MAXX(ALL(Sales[Channel],Sales[Sales Amount]VAR Color=IF ([Sales Amount]=Maxsales," red","green " )RETURNColor)).
Hello, you may follow the dax measure below and put into the conditional formatting for the color MAX bar.
IF(
CALCULATE(MAX('Sales Amount'),ALL('Channel')) = 'Sales Amount',
"Red",
"Green"
)
Right click the sales at the values then choose Conditional Formatting and Font ColorAfter that choose Field Value and choose the Measure you just now created. It should show the color now.
Hope this can help you.
1 Reply
- Chew_WenJieResolver III
Hello, you may follow the dax measure below and put into the conditional formatting for the color MAX bar.
IF(
CALCULATE(MAX('Sales Amount'),ALL('Channel')) = 'Sales Amount',
"Red",
"Green"
)
Right click the sales at the values then choose Conditional Formatting and Font ColorAfter that choose Field Value and choose the Measure you just now created. It should show the color now.
Hope this can help you.