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 in alternate state field

Hello!!!

What is the syntax to find the maximum value of a alternate state field?

This is my original expression: Sum({<ID_ROLLING={$(=Max(ID_ROLLING))},YEAR=[Group PL 1]::YEAR, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

But now I just need those whose [Group PL 1]::year is the maximum value. Something like this wrong expression: Sum({<ID_ROLLING={$(=Max(ID_ROLLING))},YEAR=[Group PL 1]::max(YEAR), MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

Regards.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I hope this works.

Sum({<ID_ROLLING={$(=Max(ID_ROLLING))},YEAR={$(=Max({[Group PL 1]}YEAR))}, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

View solution in original post

4 Replies
Not applicable
Author

Hi,

Syntax is

Max({Platform1}(InputDate))

here Platform1 is the alternatestate name.

Not applicable
Author

Shruthi, thanks for your answer. But I need to set it as a condition of the function. My function is sum (not max), but a condition of the sum function is that the year value is the maximum.

I'll try to explain better, this is my original function: Sum({<ID_ROLLING={$(=Max(ID_ROLLING))},YEAR={$(=Max(YEAR))}, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

I need the same function, but the condition of the maximum year must be for a specific alternate state, in this case : [Group PL 1] is the alternate state name.

Not applicable
Author

Hi,

I hope this works.

Sum({<ID_ROLLING={$(=Max(ID_ROLLING))},YEAR={$(=Max({[Group PL 1]}YEAR))}, MONTH_SHORT_NAME=[Group PL 1]::MONTH_SHORT_NAME>}VALUE)

Not applicable
Author

Thank you very much Shruthi Reddy it works!!

Regards