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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
P_Kumar
Contributor II
Contributor II

Automated selection of Maximum month from selected Year

Hi,

I have a requirement to show the Maximum month (December)  'Sales Revenue' for the corresponding Year selected from filter box.  There might also be a case where user select multiple years and then the selected year's Maximum month's (i.e. December) data should be displayed. Kindly advise.

Labels (2)
1 Solution

Accepted Solutions
y_grynechko
Creator III
Creator III

Hey,

 

did you try to create Month-Year column in calendar and use max function? 

I do it this way: 

(Date(monthstart(Your Date), 'MMM-YY')) as MonthYear

And later on in the app use this to get max month data: 

sum({$<MonthYear ={"$(=Max(MonthYear))"} >}Sales)

 

 

View solution in original post

3 Replies
y_grynechko
Creator III
Creator III

Hey,

 

did you try to create Month-Year column in calendar and use max function? 

I do it this way: 

(Date(monthstart(Your Date), 'MMM-YY')) as MonthYear

And later on in the app use this to get max month data: 

sum({$<MonthYear ={"$(=Max(MonthYear))"} >}Sales)

 

 

Anil_Babu_Samineni

Can't you simplify using this?

sum({$<MonthNum={"$(=Max(MonthNum))"} >} Revenue)

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
y_grynechko
Creator III
Creator III

Seems the same, depends on what you create in the calendar.