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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
scott_simmons
Partner - Contributor
Partner - Contributor

Script to create a rolling 12 month value.

I have a table of information that contains Cust#, Year, Month, SalesTotal.  The client wants to classify the customers over a rolling period of the prior 12 months.  They want to see how the customer ranks using a rolling 12 month of sales.


For example in

Jan 2020 = sum( Dec 2019 to Dec 2018)

Dec 2019 = sum(Nov 2019 to Nov 2018)

Nov 2019 = sum(Oct 2019 to Oct 2018)

 

How do I create a script that will create the following table

customer

Current month

prior 12 months sales

 

 

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Take a look  at the HIC blog post "The As-of-table". It is a quite good approach for enabling R12 calculations.

https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130

View solution in original post

1 Reply
Vegar
MVP
MVP

Take a look  at the HIC blog post "The As-of-table". It is a quite good approach for enabling R12 calculations.

https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130