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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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.

Labels (1)
1 Reply
swuehl
Champion III
Champion III

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.