Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

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)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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