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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis problem

Hi,

I must calculate stock on two given dates. Set analysis are

Sum({1<Date={"<=$(vFirstDate)"}>}Quantity)

Sum({1<Date={"<=$(vSecondDate)"}>}Quantity)

Both results are always same despite different dates.

Any ideas?

TIA

Labels (1)
17 Replies
Not applicable
Author

I have table with posting dates and quantity. If I wish get stock on the certain date I must sum all quantity transactions from first date. My result table must show stock on two different selected dates .

Kushal_Chawda
MVP
MVP

try to exclude other period filters

Sum({1<Date={"<=$(vFirstDate)"}, Year, Month, Quarter>}Quantity)

Sum({1<Date={"<=$(vSecondDate)"},Year, Month, Quarter>}Quantity)

Not applicable
Author

Actually I don't have any other period filter..

sunny_talwar
MVP
MVP

How about this?

Sum({1<Date={"<=$(=vFirstDate)"}>}Quantity)

Sum({1<Date={"<=$(=vSecondDate)"}>}Quantity)

or

Sum({1<Date={"<=$(=$(vFirstDate))"}>}Quantity)

Sum({1<Date={"<=$(=$(vSecondDate))"}>}Quantity)

Kushal_Chawda
MVP
MVP

I think you already have identifier as 1, I didn't noticed. But how you are getting the values in both the variables?

Not applicable
Author

From Slide/Calendar object

Not applicable
Author

Thx a lot, first solution works for me

I owe you a beer

sunny_talwar
MVP
MVP

What's the address?