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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Value

Hi Community,

How to get Max value for 2 parametres.

Ex:

I want Count of X value with two parametres

EX:   Count(Max(CurrentMonth, CurrentYear)X)

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=COUNT({<Year = {'$(=Max(Year))'},Month = {"$(=Month(MakeDate(Year(Today()),Max({<Year = {'$(=Max(Year))'}>}Month))))"}>}X)

View solution in original post

3 Replies
Not applicable
Author

Hi,

Try like below,

Count({<CurrentMonth={"$(=Max(CurrentMonth)"}, CurrentYear={"$(=Max(CurrentYear)"}>}X)

sunny_talwar

Not really sure I understand your requirement, but may be this:

FirstSortedValue(X, -CurrentYear&CurrentMonth)

MK_QSL
MVP
MVP

=COUNT({<Year = {'$(=Max(Year))'},Month = {"$(=Month(MakeDate(Year(Today()),Max({<Year = {'$(=Max(Year))'}>}Month))))"}>}X)