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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
alex59800
Contributor II
Contributor II

Max invoice date in a set analysis expression

Hi all

I have a datamart with invoice dates. My actual max invoice date is 15/01/2010.

I would like to obtain sales amount for the max date above, which would be unchanged whatever my selections are:

for example if i select year 2009, it will give me sales amount for 15/01/2010 anyway.

i tried this but it's not working and i can not figure out why :

=sum({$<[INVOICE DATE]={'$(vDatemax)'}, YEAR={$(=Year(vTodaysDate))}>}[SALES AMT])

where vDatemax=max([INVOICE DATE])

and vTodaysDate=num(Today())

when i select year 2010 all is ok, but when i select 2009 or 2008, the answer is 0.

thx a lot for your help

10 Replies
Not applicable

What does your expression look like when the dollar sign expansion is evaluated? Have you created a working expression with the max invoice date explicitly entered?

=sum({1<[INVOICE DATE]={'15/01/2010'}>}[SALES AMT])


Does the above expression work?