14 Replies Latest reply: Apr 20, 2018 3:45 AM by youssef belloum

# 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.

• ###### Re: Rolling  Sum Of 12 Month

Maybe

=Rangesum(Above(expression,12))

• ###### 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.

• ###### 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..

• ###### Re: Rolling  Sum Of 12 Month

I calculates what I want.But it shows me this

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]

• ###### 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 ?

• ###### 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]

• ###### 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

• ###### 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

• ###### Re: Rolling  Sum Of 12 Month

so try this:

• ###### Re: Rolling  Sum Of 12 Month

it doesn't work

• ###### Re: Rolling  Sum Of 12 Month

• ###### Re: Rolling  Sum Of 12 Month

it doesn't work I also tried this ,