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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling 12 months calculation

Hello

I have a calculation where I am trying to implement the following rolling

If( [X Date] >= "$(=[Start Period])" and [X Date] < date("$(=[End Period])"+12) ,[Amount],0)

The start period and end period variables has a date behind them. So $(Start Period) is nothing but [Start Date] and $("End Period") is nothing but [End Date].

What this expression is aiming to do is if I am in Jan 2014 it should bring me the rolling amounts where [X Date] is between between Jan 1st 2014 to Dec 31st 2014.

I would like to know if the way I have written by writing +12 is appropriate? or is there another recommended way of writing it?

Regards

Rizwan.

1 Reply
Sokkorn
Master
Master

Hi Rizwan,

This one is great for rolling period Calculating rolling n-period totals, averages or other aggregations

Regards,

Sokkorn