Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Set Analysis - need to always get a value for the max month

Expression is this:

Sum({1<YEAR_MONTH={'$(=MaxString(YEAR_MONTH))'},METRIC_NAME={'X'},COMPANY_NAME={'Y'}>}METRIC_QUANTITY)

I want this measure to always be the sum of the value for the most recent month in the data when the conditions X and Y are met.

The above works except that it changes as date selections change.  It needs to remain static.  I'm sure that there is some syntax that I'm missing.

Thanks!

1 Solution

Accepted Solutions
MVP
MVP

Re: Set Analysis - need to always get a value for the max month

Try this:

Sum({1<YEAR_MONTH={'$(=MaxString({1}YEAR_MONTH))'},METRIC_NAME={'X'},COMPANY_NAME={'Y'}>}METRIC_QUANTITY)

1 Reply
MVP
MVP

Re: Set Analysis - need to always get a value for the max month

Try this:

Sum({1<YEAR_MONTH={'$(=MaxString({1}YEAR_MONTH))'},METRIC_NAME={'X'},COMPANY_NAME={'Y'}>}METRIC_QUANTITY)