Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

aslam24196
New Contributor III

Rolling Month Sum

Hi guys,

I needed rolling sum of current year for 12 months, if there are less than 12 months available, it should take how much ever months are remaining from the previous year column. I did achieve this in a text box for result. In my application, when I click a MonthYear, the text box displays the corresponding Rolling Sum. However, I need this in a straight chart, with MonthYear as Dimension and Rolling month in its corresponding expressions column. I have attached the qvw just in case. There is text object. I need the values of that in the chart. If possible in the backend, please guide me.

Thank you guys.

Tags (2)
1 Solution

Accepted Solutions
aslam24196
New Contributor III

Re: Rolling Month Sum

Thanks sudhir for the help. I played around for sometime and I did it. Yes what you did was correct. But it also needs the Rangesum of remaining months prom PY. I'll attach the file..

Thank you,

Cheers!

12 Replies
Partner
Partner

Re: Rolling Month Sum

Hi,

Why do you have two separate fields CY and PY....?

shiveshsingh
Honored Contributor

Re: Rolling Month Sum

Can you elaborate it ?

it should take how much ever months are remaining from the previous year column.

Partner
Partner

Re: Rolling Month Sum

You could directly get previous rolling 12 months based on the MonthYear selected using

=Monthstart(Addmonths(MonthYear,-11))

Partner
Partner

Re: Rolling Month Sum

I just added another Straight Table with same dim  and exp

Its working fine for me

PFA

aslam24196
New Contributor III

Re: Rolling Month Sum

That is the format I got the data in. So for 2016, they have the data only in PY field.

Highlighted
aslam24196
New Contributor III

Re: Rolling Month Sum

If I select the MonthYear Mar 2017, It should calculate the rolling sum for Jan, Feb, Mar 2017 from CY

+

April to December rolling sum from PY. So that for every month year selected. There is a rolling sum of 12 months.

Partner
Partner

Re: Rolling Month Sum

Plz see the above attachment

its working fine....

aslam24196
New Contributor III

Re: Rolling Month Sum

Okay, So instead of the rolling sum displaying the aggregated total, my requirment is to display the rolling so of each monthYear in their corresponding Rows. Not in the totals.

Partner
Partner

Re: Rolling Month Sum

You mean like this...?

1.JPG