Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

qlikuserkv
New Contributor III

Rolling Sum Of 12 Month

HI

I need to make line chart where on x axis would be months and day of today like if today is 17 april  it would be , 17apr ,17mar  ,17feb and on Y axis Would be Sum of amounts.

From every date There Should be sum of last 12 month, like if it is 17 april, on chart this point should Show sum of amount from 16/04/2017 to 17/04/20178 and so on for every date on line Chart.

14 Replies
vvvvvvizard
Contributor III

Re: Rolling Sum Of 12 Month

Maybe

=Rangesum(Above(expression,12))

qlikuserkv
New Contributor III

Re: Rolling Sum Of 12 Month

As I Understand this formula show Cumulative sum but in case when select 15/05/2017 this date it should show sum between 14/05/2016 - 15/05/2017.

YoussefBelloum
Esteemed Contributor

Re: Rolling Sum Of 12 Month

Hi,

for rolling 12 months on every date, try this:

RangeSum(above(total sum(Measure_field),0,12))


PS: Sum is an example..

vvira1316
Valued Contributor II

Re: Rolling Sum Of 12 Month

qlikuserkv
New Contributor III

Re: Rolling Sum Of 12 Month

I calculates what I want.But it shows me this

11111111111.PNG

As we see before December 2016 it can't calculate because the information that we have is from Jan 16 . This line chart shows all months that we have but I want to show only the last 12 month. From Apr  17 to Apr 18 .  Dimension that I use is =[Year Month]

YoussefBelloum
Esteemed Contributor

Re: Rolling  Sum Of 12 Month

we need to add extra code as a set analysis to limit it to the last 12 months, it is possible.

what is the name of the dimension used and what is it's format ?

qlikuserkv
New Contributor III

Re: Rolling Sum Of 12 Month

Dimension that I use is =[Year Month]

In the script I have written this ----  month(%lnk_date)  & '`' &  right(year(%lnk_date),2)  as [Year Month]

vvira1316
Valued Contributor II

Re: Rolling Sum Of 12 Month

Hi,

Would it possible for you to share masked data and app. It would help to help you.

Also  what I'm observing in your chart screen shot is that you are showing Month Year  (it is not date, I understand you want to display past 12 months particular day information based on today's date).

BR,

Vijay

qlikuserkv
New Contributor III

Re: Rolling Sum Of 12 Month

Thanks for helping me, but  sorry, I can't

Yes, I want to display past 12 months particular day information based on today's date but I also want to have a  drill-down on them  that show me the dates

Community Browser