Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jpapador
Partner - Specialist
Partner - Specialist

Max not working with selections

I have an expression:

Sum({$<WeekYear={'$(=MaxString(WeekYear)-1)'}>} Duration)

Which works great at summing last weeks data.  However if I make any selections in a date field the expression the expression stops working (just shows null).

I know Max(WeekYear)-1 works in a text box when I make selections but not in set analysis.  What am I missing?

1 Solution

Accepted Solutions
Anonymous
Not applicable

try if this is what you want

I used additionally [Week of] in set Analysis

Regards

View solution in original post

4 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

perhaps you should add Set Analysis modifiers to disregard calendar selections, if they mess up your  logic?

Also, if your YearWeek is a string, then subtracting 1 can be tricky...

Anonymous
Not applicable

Hi,

compare in number format.

HTH

Not applicable

Hi ,

Could you post sample apps.

We can see the issue.

thanks

Anonymous
Not applicable

try if this is what you want

I used additionally [Week of] in set Analysis

Regards