Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kev6brown
Partner - Creator
Partner - Creator

Rolling 3 month period

How do i produce a rolling 3 month period in Qlik Sense?

 

I have a chart that is broken down into month but i need it to show a rolling 3 month period.  so for period ending March, the bar needs to be for Jan, Feb, Mar, then the period ending April, I need Feb, Mar, Apr, make sense? The field for my date is called WAVE

Any help please

Kev

Labels (1)
6 Replies
agigliotti
Partner - Champion
Partner - Champion

you can use something as below:

rangesum( above( sum(...), 0, 3 ) )

I hope it helps.

juliensaintmaxent3113
Luminary Alumni
Luminary Alumni

hi,

yuo can use rangesum with a set analysis or a conditionnal expression :

RangeSum(Above(Sum({<Month={">=$(=Month-3)<=$(=month(today()))"}>}IND_MNT_MANDATE),0,rowno()))

 @+

sunny_talwar

What do you want to see for Jan or Feb? Will Jan be just Jan or will it be Nov, Dec of last year and Jan for this year?

kev6brown
Partner - Creator
Partner - Creator
Author

For Jan I'll want to see Nov, Dec and Jan.

juliensaintmaxent3113
Luminary Alumni
Luminary Alumni

hi ,

you can try with a set analys like i wrote in my last post and add the function addmonth(myfieldmonth,-3).

if you want a cumulative analysis , you can try :

RangeSum(Above(Sum({<Month={">=$(=addmonth(Month,-3))<=$(=Month)"}>}IND_MNT_MANDATE),0,rowno()))

Sample analysis:

Sum({<Month={">=$(=addmonth(Month,-3))<=$(=Month)"}>}IND_MNT_MANDATE)

Bye

sunny_talwar


@kev6brown wrote:

For Jan I'll want to see Nov, Dec and Jan.


Do you have MonthYear field in your dashboard? a field which would include both the Month and Year information for your date?

Date(MonthStart(DateField), 'MMM-YYYY') as MonthYear