Forum Discussion
MAX OF A MEASURE IN CONDITIONAL FORMATTING
Hi corbs
Please try something like below:
MAXX Year =
MAXX (
ADDCOLUMNS (
SUMMARIZE ( ALL ( Dates[Year] ), Dates[Year] ),
"@rev", [Total Revenue]
),
[@rev]
)
- corbs1 year agoFrequent Visitor
Thank you so much.
I got it make it work using both solutions: create the maxx as you suggested and the flags as per DataNinja777 suggested.
However, it's not dynamic as per the user selection of year. Is there a way to do that?
This is when all years are selected in the slicer - working perfectly! :
If user select for example 2020 - 2023:
- Anonymous1 year agoNot applicable
Hi corbs , hello DataNinja777 and danextian, thank you for your prompt reply!
Use the following measure to dynamic calcualte:MAXX Year = MAXX( ADDCOLUMNS( SUMMARIZE( ALLSELECTED('Calendar'[Year]), 'Calendar'[Year] ), "@rev", [YTD Metric] ), [@rev] )Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- corbs1 year agoFrequent Visitor
Thank you for your reply, Anonymous !
The measure to get the max dynamically it's working just fine.
But now, my measure to flag if max = current ytd is not anymore:
YTD and MAXX and matching, but flag remains 0.
This is what I was using before (and I was working). Should I remove year context from this one as well? I did that but is not working 😞
Highlight Max =IF([YTD Turnover]= [MAX YTD],1,0)