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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
spividori
Specialist
Specialist

Set Analysis

HI!

In my example I have a table with dates and quantity.
I read the date as Month Year and then arm a bar graph with this dimension.
Need for each dimension that adds the previous two.
For example: in June 12 should add April 12, May 12 and June 12.
I wish I could do it with Set Analysis.

Regards.

5 Replies
MayilVahanan

HI

I can't able to see the fields in your example file.. Try like this

=sum({<Date = {'>=$(=vTest)<=$(=vTest1)'}>}Quantity)

where vTest = AddMonths(Min(Date),-2)

vTest1 = Max(Date)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

Set analysis won't consider your current dimension value, because it's evaluated once per chart.

I think the way to go is using chart inter record functions like above().

Try something like

=rangesum(above(sum(Quantity),0,3))

edit: changed 2 to 3, you requested summing 3 Months..

spividori
Specialist
Specialist
Author

Sorry
Here is my example with data.

Regards.

johnw
Champion III
Champion III

Unless I'm misunderstanding, just set Accumulate 3 Steps Back on the Expressions tab.  That seems like the easy way, anyway.

spividori
Specialist
Specialist
Author

I tried also to select a month you also add the three above.

But will use the rangesum (). Thank you all.

Regards.