Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Max of Month Year help

Hi Experts,

Can any one please help me on below requirement. I have a Table like below.

In the KPI I have to show Max of Month Year where Type= a i.e., Apr 2019.

I have tried below expression.But its not working showing Dash(-) in KPI.Please help me on this.

if(Match(Type,'a'),Date(Max([Month Year]),'MMM YYYY'))

Type   Month Year

a           Jan 2019

a          Feb 2019

a          Mar 2019

a          Apr 2019 

b           Jan 2019

b          Feb 2019

b          Mar 2019

b         Apr 2019 

b        May 2019

b         Jun 2019

-

Thanks in advance

1 Solution

Accepted Solutions
Vegar
MVP
MVP

Adjust @Anil_Babu_Samineni solutions with a set for the right Type: {<Type={'a'}>}
MaxString({<Type={'a'}>}[Month Year])
Or
Max({<Type={'a'}>}Month) & ' ' & Max({<Type={'a'}>}Year) // If u have Month and Year separate field
Or
MonthName(Max({<Type={'a'}>}DateField))

View solution in original post

4 Replies
Anil_Babu_Samineni

Try this way

MaxString([Month Year])

Or

Max(Month) & ' ' & Max(Year) // If u have Month and Year separate field

Or

MonthName(Max(DateField))

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
mahitham
Creator II
Creator II
Author

Hi @Anil_Babu_Samineni 

Thanks for your help.

By the above expressions I am getting max of Month year as Jun 2019 but I have to get Type a related max of month year i.e., Apr 2019

 

Anil_Babu_Samineni

Try this?

MaxString({<[Month Year] ] {"<$(=MonthName(Today()))"}>} [Month Year])

Or

Max(Month(AddMonths(Today(),-1))) & ' ' & Max(Year)

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
Vegar
MVP
MVP

Adjust @Anil_Babu_Samineni solutions with a set for the right Type: {<Type={'a'}>}
MaxString({<Type={'a'}>}[Month Year])
Or
Max({<Type={'a'}>}Month) & ' ' & Max({<Type={'a'}>}Year) // If u have Month and Year separate field
Or
MonthName(Max({<Type={'a'}>}DateField))