Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max period regardless of selection

I'm trying to get the MAX period even if a different period is selected..

This is the expression I'm working with

Sum({$<PERIOD={$(=max(PERIOD)) ITD_AMOUNT )

Thanks for any help

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Are you actually selecting on other date fields like date number, Date, Month, Year? I think you may need to clear them in the set expression then:

sum({$<PERIOD={$(=max(PERIOD))}, Year=, Month=, Date= >} ITD_AMOUNT)

View solution in original post

4 Replies
swuehl
MVP
MVP

What is the format of your PERIOD field?

max() function will return a numerical, so this will only work if PERIOD is also a numerical.

Another issue might be, that your expression seems to miss a } >} sequence, I think it should look like:

Sum({$<PERIOD={$(=max(PERIOD)) } >} ITD_AMOUNT )

Not applicable
Author

PERIOD is a numeric field, 201112 being the most recent PERIOD.  It has a rolling inception to date number.. so 201109 is the ITD Amount at that Sept 2011, but I'd like it to always be the highest # period without having to hard code it in.

I had a hard time copying and pasting the expression in, it does contain the  } >} sequence.

swuehl
MVP
MVP

Are you actually selecting on other date fields like date number, Date, Month, Year? I think you may need to clear them in the set expression then:

sum({$<PERIOD={$(=max(PERIOD))}, Year=, Month=, Date= >} ITD_AMOUNT)

Not applicable
Author

That did the trick, thanks!