14 Replies Latest reply: Feb 17, 2017 3:36 PM by Ginny Choy

# How to do rolling 12 months sum

Good morning, I'm a qlik sense beginner. I would like to know how to do rolling last 12months sum, by selecting a month / year. Thank you.

• ###### Re: How to do rolling 12 months sum

does it works the same for qlik sense?

Because it seems like qlikview.

• ###### Re: How to do rolling 12 months sum

Most of the things should work except for the option to accumulate using the accumulate check box on expression tab which is only available in QlikView

• ###### Re: How to do rolling 12 months sum

ok i am gonna try it and let you know. thanks

• ###### Re: How to do rolling 12 months sum

Where do I put the year in the expression?      rangesum(above(sum(Amount),0,3))

Example: if I select november- 2016

I want the sum rolling last 12 months (from december 2015 to november 2016)

• ###### Re: How to do rolling 12 months sum

May be like this:

Dimension

MonthYear

Expression

Rangesum(Above(Sum({<MonthYear>}Amount),0,12)) * Avg(1)

• ###### Re: How to do rolling 12 months sum

I have a question. Is there a chance to sum lateral instead of above? from right to left?

• ###### Re: How to do rolling 12 months sum

In a pivot table? You can use Before/After

Missing Manual - Before() and After()

• ###### Re: How to do rolling 12 months sum

We are trying to build the table in the data base, and looking the best way to design it.

I have a bunch of products with their revenue, and we need to calculate the average of the last 12 months for each product. Thank you for you advance help.

• ###### Re: How to do rolling 12 months sum

The best way would be to use The As-Of Table

• ###### Re: How to do rolling 12 months sum

I found a way to do it.

What do you think about it?

• ###### Re: How to do rolling 12 months sum

If this works, then I am guessing YearMonth is not one of your fields. If that's true then I would def. go with this option

• ###### Re: How to do rolling 12 months sum

YearMonth is a field autocreated from a autocalendar (script), for for my date field (udolar_fecha_emision)