Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

12 month roll

Hi,

Can anyone help me create an expression for measuring 12 rolling sales.

Thomas

11 Replies
Not applicable
Author

Hi Thomas,

Here's an example of a 3 month rolling average using the rangesum and above functions. Hopefully you can adapt this to you setup.

This article by gwassenaar  is also a great resource:

Calculating rolling n-period totals, averages or other aggregations

Best,

Matt

Not applicable
Author

Hi Matt,

Thanks for your reply.

It issue with this is that when you choose a specific month it shows the sales for that month and not the 3 month rolling avg.

Regards,

Thomas

Not applicable
Author

Ok, what about ignoring the date dimension like this:

rangeavg(above(sum({<YourDateField = >}Sales),0,3))

Best,

Matt

Not applicable
Author

Hi Thomas, try with this set analysis in your expression: Month= {">=$(=max(Month)-12)<=$(=max(Month))"}

Hope it helps you!

Regards!

Not applicable
Author

Capture.PNG.png

I can't really ignore the date dimension since I will choose a specific month to see numbers for that month.

Thomas

Not applicable
Author

In this.

Rangeavg(above(sum({<Month = >} Sales), 0,12))

?

Not applicable
Author

There is a little example, I use Q (1,2,3,4) as dimension, and a simple sum with the expression given in the last post. The dimension will be filtered by the range in the expression

Hope it helps!

Regards!

rangesum.png

Not applicable
Author

Capture.PNG.png

Hmm....this gives me the same as a simple SUM.

:

Not applicable
Author

So you need a total InvoiceQuantity of the last 12 months in a single row?