Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to highlight the date where the sum(sales) was the maximum.
The Set Analysis I am using for Sales is ;
Sum({<[ReportDate.autoCalendar.MonthsAgo]={"<14"}>} Sales)
To get the Max value :
MAX(AGGR(Sum({<[ReportDate.autoCalendar.MonthsAgo]={"<14"}>} Sales),ReportDate.autoCalendar.MonthsAgo]))
This results in the correct max sales value - But, I would like to return the Date that the max value occurred, and not the value itself.
can u try using FirstSortedValue :
FirstSortedValue(Month, -Aggr(Sum(Sales), Month))
or
=only({<sales={'$(=Max(sales))'}>}Month)
Give this a try: only({$<[ReportDate.autoCalendar.MonthsAgo]={"=(Rank(AGGR(Sum({$<[ReportDate.autoCalendar.MonthsAgo]={'<14'}>}Sales),[ReportDate.autoCalendar.MonthsAgo])))=1"}>}[ReportDate.autoCalendar.Month)
can u try using FirstSortedValue :
FirstSortedValue(Month, -Aggr(Sum(Sales), Month))
or
=only({<sales={'$(=Max(sales))'}>}Month)