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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Returning a value for the latest month when more than one month is selected?

Hi all,

I have some data which represents the count of devices. I would like to write an expression which returns the count of devices for the most recent month selected. For example. If the user has selected Jan, Feb, Mar, I would like the expression to sum up the count of devices for March only. I have attached an example. In this example I wanted the expression in the blue text object to return "7" with Jan, Feb, and Mar selected.

I have tried max(Month) unsuccessfully - would someone be able to advise the best way to achieve this?

Many thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

How about something like :

=sum ({ < MonthYear={'$(=max ( MonthYear ))'} > } Machine_Count )

View solution in original post

3 Replies
Anonymous
Not applicable
Author

How about something like :

=sum ({ < MonthYear={'$(=max ( MonthYear ))'} > } Machine_Count )

Not applicable
Author

Thank you!

Not applicable
Author

Why it not works for Max(Month)? and works for Max(MonthYear)?

What is the logic?