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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rolling and Previous

Hi , i am a bit confused with the Rolling12Months and Previous12Months, is it the same as YTD AND Last year YTD(LYYTD), because the results in the chart are showing the same for Rollin12 and YTD , Previous12 and LYYTD. Can anyone confirm this please?

And how can the Rolling12 and Previous12 months results be obtained in the backend script rather than using it in chart expressions?

Thanks and Regards

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Rolling 12 Months means..

Consider today's date.. 4th April 2018.

So rolling 12 months means any one from below

  • March 2017 to April 2018
  • April 2017 to March 2018

But YTD means (compare today's date)

05/04/2017 to 04/04/2018

Previous YTD means

05/04/2016 to 04/04/2017

So if you want Bar chart showing Rolling 12 months for all the bars for last 12 months

You can use below blog.

Calculating rolling n-period totals, averages or other aggregations

You can show last 12 months with rolling 12 months as below

Bar Month       Bar Value

Apr 2018         Mar 2017 to Apr 2018

Mar 2018        Feb 2017 to Mar 2018

Feb 2018        Jan 2017 to Feb 2018

and so on

May 2017        Apr 2016 to May 2017

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Rolling 12 Months means..

Consider today's date.. 4th April 2018.

So rolling 12 months means any one from below

  • March 2017 to April 2018
  • April 2017 to March 2018

But YTD means (compare today's date)

05/04/2017 to 04/04/2018

Previous YTD means

05/04/2016 to 04/04/2017

So if you want Bar chart showing Rolling 12 months for all the bars for last 12 months

You can use below blog.

Calculating rolling n-period totals, averages or other aggregations

You can show last 12 months with rolling 12 months as below

Bar Month       Bar Value

Apr 2018         Mar 2017 to Apr 2018

Mar 2018        Feb 2017 to Mar 2018

Feb 2018        Jan 2017 to Feb 2018

and so on

May 2017        Apr 2016 to May 2017

Anonymous
Not applicable
Author

Hi Manish, Thanks for the reply:

I am using the below expression in chart for

Rolling12Months:

PeriodID = {">=$(=Max(PeriodID-11) <= $(=Max(PeriodID))"},Year = , Quarter = , Month =

This will give me the Rolling 12 Months .

Similarly if i want Previous12Months , what would be the expression like?

MK_QSL
MVP
MVP

The one you are using is actually for Previous 12 Months.

Rolling 12 months, either use the link I have provided in 1st answer. so something like below

RangeSum(Above(SUM(Expression),0,12));

Check below..

Rolling 12 months | Qlik Community