Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kartikaysingh
Contributor III
Contributor III

Rolling 12 for attached excel in Bar chart in qlikview

Hi,

Below (big table) is what I have achieved as a Rolling 12 calculation (R12 Av) in excel. I want to replicate the same and calculate the R12 Av in Qlikview as a chart, bar would work.

What I want is,

For Filter YearMonth, whatever I select for e.g. if I select Jun-2017, I should get the bar value from Jul-2016 to Jun-2017 with R12Av value on each respective bar.

For reference -

R12Av for month Jun-2017 is calculated as

{

sum of R12 £ is for e.g. for Jun-2017 sum of below i.e. from Jul-2016 to Jun-2017

   

Jul-169,330,523.00
Aug-1610,334,837.00
Sep-168,796,145.00
Oct-1613,881,265.00
Nov-1636,701,499.00
Dec-1610,577,524.00
Jan-1714,749,355.00
Feb-1713,189,112.00
Mar-1718,354,682.00
Apr-1710,449,132.00
May-1712,280,411.00
Jun-1713,608,177.00

 

/ (divided by)

sum(R12# for Jun-2017)i.e. from Jul-2016 to Jun-2017

   

Jul-161333
Aug-161558
Sep-161270
Oct-161209
Nov-161288
Dec-161251
Jan-171392
Feb-171311
Mar-171648
Apr-171146
May-171536
Jun-171595

Same should happen for every YearMonth selection.


YearMonthIncurredClaim CountR12
Jan-147,301,039.0013255510
Feb-147,004,876.0015534511
Mar-148,367,315.0019774232
Apr-1411,037,127.0018655918
May-1410,801,244.0017086324
Jun-148,435,454.0016205207
Jul-149,615,887.0016675768
Aug-148,719,864.0012387043
Sep-1412,503,307.0014478641
Oct-148,758,542.0014775930
Nov-1410,018,063.0014037140MonthR12 AvR12 £R12 #
Dec-1410,257,436.0014127264Dec-146,036112,820,15418,692
Jan-156,024,823.0012314894Jan-155,998111,543,93818,598
Feb-156,915,577.0013735037Feb-156,051111,454,63918,418
Mar-159,642,458.0015066403Mar-156,281112,729,78217,947
Apr-159,645,093.0012897483Apr-156,409111,337,74817,371
May-1513,581,436.00126610728May-156,741114,117,94016,929
Jun-158,749,704.0013976263Jun-156,850114,432,19016,706
Jul-159,733,178.0012317907Jul-157,041114,549,48116,270
Aug-157,672,727.0010976994Aug-157,037113,502,34416,129
Sep-156,012,754.0011175383Sep-156,773107,011,79115,799
Oct-159,116,868.0012897073Oct-156,878107,370,11715,611
Nov-1510,045,735.0012587985Nov-156,944107,397,78915,466
Dec-158,925,378.0012247292Dec-156,942106,065,73115,278
Jan-167,645,712.0012945909Jan-167,020107,686,62015,341
Feb-168,521,357.0014655817Feb-167,082109,292,40015,433
Mar-1611,092,997.0016206848Mar-167,123110,742,93915,547
Apr-169,917,940.0016196126Apr-166,992111,015,78615,877
May-1611,860,046.0015147834May-166,778109,294,39616,125
Jun-1610,283,455.0015696554Jun-166,801110,828,14716,297
Jul-169,330,523.0013337000Jul-166,734110,425,49216,399
Aug-1610,334,837.0015586633Aug-166,707113,087,60216,860
Sep-168,796,145.0012706926Sep-166,811115,870,99317,013
Oct-1613,881,265.00120911482Oct-167,124120,635,39016,933
Nov-1636,701,499.00128828495Nov-168,683147,291,15416,963
Dec-1610,577,524.0012518455Dec-168,767148,943,30016,990
Jan-1714,749,355.00139210596Jan-179,132156,046,94317,088
Feb-1713,189,112.00131110060Feb-179,491160,714,69816,934
Mar-1718,354,682.00164811138Mar-179,903167,976,38316,962
Apr-1710,449,132.0011469118Apr-1710,219168,507,57516,489
May-1712,280,411.0015367995May-1710,231168,927,94016,511
Jun-1713,608,177.0015958532Jun-1710,416172,252,66216,537
3 Replies
tussh077
Contributor III
Contributor III

Hi Kartikay,

The solution can be implemented in two steps.

1. Add a new data table to your data model using below code.

DM Code.PNG

2. Add MonthYear dimension and below expression to your line/ bar chart.

Chart Expression.PNG

Hope this helps!

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Kartikay,

Please find attachment it may help you.

Thanks,

Arvind Patil

Kushal_Chawda

check this

Rolling N months