Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khalander
Creator II
Creator II

max monthyear in calculated dimension

Hi,

I have written below expression in calculated dimension to get max month year but getting all months in dimension.

=aggr(max(monthyear),monthyear)

Please do the needful.

Regards,

Khalander

10 Replies
Anil_Babu_Samineni

Try to use?

=aggr(max(TOTAL monthyear),monthyear)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
khalander
Creator II
Creator II
Author

Hi Anil,

It is giving max month year but not get correct values for maximum month

Anil_Babu_Samineni

Image please

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Clever_Anjos
Employee
Employee

=aggr(max(monthyear),monthyear) will aggregated for every monthyear and calculating the max(monthyear), so that´s correct retrieving all monthyear

try with

max(monthyear)

khalander
Creator II
Creator II
Author

Hi Anjos,

It is showing error in calculated dimension message if i am giving max(monthyear)

Anil_Babu_Samineni

Max() won't work in calculated instead why can't you write in expression and promote them to dimension place?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

It should even work without aggr(), like max( TOTAL monthyear) . If your monthyear is a dual field, this expression should work; you might want to format it like = monthname(max(total monthyear))

Clever_Anjos
Employee
Employee

try with

=max(total monthyear)

khalander
Creator II
Creator II
Author

Yes It is giving max monthyear if i used total word  but my expression values is coming total values instead of max month values