Forum Discussion
badger123
7 years agoResolver I
Highlight max value in column chart
Hi all,
I'm trying to figure out how to highlight the max value in my simple column chart. E.g. here I would like Feb 2019 bar to be a different colour from the rest. Please can someone help?
I have got this so far:
Measure1=
VAR MAXValue = MAXX( ALL( 'Table1'[Short_Date]), [Sum_Values] )
VAR TotalValues= [Sum_Values]
RETURN
IF(TotalValues= MAXValue, BLANK(), TotalValues)
Measure2=
VAR MAXValue = MAXX( ALL( 'Table1'[Short_Date]), [Sum_Values])
RETURN
IF( [Sum_Values] = MAXValue, MAXValue, BLANK() )
Where Sum_Values is a simple sum measure. Short_Date is a custom column I made to format the date in MMM-YYYY.
This isn't working for some reason. Please help! :)
5 Replies
- v-jiascu-msftMicrosoft Employee
Hi badger123,
The second one should work. Please refer to my test and the snapshot.
Measure = VAR maxSales = MAXX ( ALLSELECTED ( 'Calendar'[Short_Date] ), [Sum_Values] ) RETURN IF ( [Sum_Values] = maxSales, [Sum_Values], BLANK () )
Best Regards,
- badger123Resolver I
Thanks v-jiascu-msft for this. I tried following the steps but for some reason it's not working as expected. Do you know why this is? Is it because my Short_Date is text not date? When I use an actual date column it works. Is there a way I can format date MMM-YYYY?
- SJimFrequent Visitor
MMM-YYYY default option is not possible but MMMM yyyy is: