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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ChloeA
Contributor II
Contributor II

Rolling 12 months Sum

I have a dataset with the premium and paid amount in each month. I want to show the rolling 12 months sum of the premium and paid in a table on QLik. Does anyone know how to do it? Thanks.

I have attached a excel with a sample of my dataset on tab "Dataset" and my desired Qlik table on tab "QLik Dashboard".

Labels (1)
5 Replies
-SW-
Partner - Creator II
Partner - Creator II

try
RangeSum(Above(Sum({<Period,dimension={'Paid'}>}value),0,12))
and
RangeSum(Above(Sum({<Period,dimension={'Premium'}>}value),0,12))

ChloeA
Contributor II
Contributor II
Author

Thanks for your reply SW.

Sorry I should mention there are some extra challenges in my dataset.

Firstly, the dataset is in a random order of period.

Secondly, there could be more than 1 row for each period and I need to sum them up.

Attached is an updated sample of my dataset.

rafaelencinas
Partner - Creator II
Partner - Creator II

Hi !

This is my sollution for you:

1 - Create a new Field named PeriodID 

(Num#(Left(Period,4))*12) + Num#(Right(Period,2)) as PeriodID

 

2 - Create a table with only one dimension Period

 

3 - Check my attachments.

 

Bye!

 

 

"Without data, you're just another person with an opinion." — W. Edwards Deming.
ChloeA
Contributor II
Contributor II
Author

Sorry I could not open the qvf file. Is it possible to share the formula here? 

rafaelencinas
Partner - Creator II
Partner - Creator II

Sure!

 

Accumulation 12 Months Paid

RangeSum(Above(Sum({<dimension={'Paid'}>} value),0,12))

 

Accumulation 12 Months Premium

RangeSum(Above(Sum({<dimension={'Premium'}>} value),0,12))

 

Bye!

"Without data, you're just another person with an opinion." — W. Edwards Deming.