Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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.

15 Replies
Not applicable
Author

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.

sunny_talwar

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

Not applicable
Author

I found a way to do it.

Sum({$< [udolar_fecha_emision.autoCalendar.YearMonth]={'>=$(=Monthstart(Addmonths(Max(udolar_fecha_emision),-11)))<=$(=Max(udolar_fecha_emision))'} >}udolar_subtotal_descuento)

What do you think about it?

sunny_talwar

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

Not applicable
Author

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

Thanks for your help.

Rose1
Contributor II
Contributor II

thank you , this is working just fine but how can I hide those Monthyear that do not have any values  and keep only the monthyear where I have the result ? 12.PNG