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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
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.