Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating last 6 months based on selected month

Hello All,

I would like to know if it is possible to automatically calculate last 6 months based on my selected month:

For example if i choose Jan 2016

How can I get make my graph automatically to show:

janv-2016

Dec-2015

Nov-2015

Oct-2015

Sept-2015

Aug-2015

Any idea?

Many Thanks,

Hasvine

23 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=Sum({<Month={'>=$(=Max(Month) - 5)<=$(=Max(Month))'}>}Amount)


Regards,

Jagan.

ecolomer
Master II
Master II

if you need include selected month use this:

=Sum({<Month={'>=$(=Max(Month) - 5)<=$(=Max(Month))'}>}Amount)


p-roll.png

Not applicable
Author

Helpful. Thanks.

Not applicable
Author

Hi Jonathan,

Actually my real dates are in DD/MM/YYYY so do I need to seperate the Year?

Thanks,

Hasvine