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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Period before the selection

How to bring the sum of the previous selection?

If I select two months, should return two months prior to selection.

example:

12/2011 and 11/2011

returns 10/2011 and 09/2011.

1 Reply
swuehl
MVP
MVP

You can use  a set expression to set DATA to the time period you want.

=SUM({<DATA = {">=$(=Date(addmonths(min(DATA),-2),'MM/YYYY'))<=$(=Date(addmonths(max( DATA),-2),'MM/YYYY'))"}>}  VALOR)

Please see attached.