Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Select dates less than date in selection

Hi QV Community,

I have a problem with creating a calculation that sums quantites for a date range prior to the date selected. See attached qvw-file. i just can't get the set analysis right.

That is, i have a column that should sum the transaction quantities for all dates prior to the selected date (date selected by user in the dale list box).

This way, i will be able to get the inventory quantity at any day in history.

Any help is much appreciated.

Thanks,

Philip

1 Solution

Accepted Solutions
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Philip,

I attached one file .Check this file is correct or not .Any Problem replay.

View solution in original post

6 Replies
Not applicable
Author

Hi Philip,

I can't open your model right now, but have you tried something with implicit field value definition:

Something like:

sum(    {$<ORDERS = P({$<DATE={"<=$(=vYourDateVariable )) )"}>} ) >}  total <PRODUCT> QTY)

:: sum qty in selection where your reference date is less than your date variable

Regards


Arthur

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi Philip,

I attached one file .Check this file is correct or not .Any Problem replay.

Not applicable
Author

Hi Philip,

You just need to remove the spaces from your expression. It should be like below.

Sum({$<Date={"<=$(=Max(Date))"}>} QTY2)

Regards,

Sajeevan

Not applicable
Author

Hi Sajeeth/ Perumal,

I have a similar issue on this matter, what if the Date is now dynamic ?

http://community.qlik.com/thread/38695?tstart=0

Thanks so much !

Arthur

Not applicable
Author

Thanks! It works! /Philip

Not applicable
Author

thanks!