Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I want to show moving averages for 5 months in my table. The dimension is org_level. if a user selects 05 as month, I should show average(volume) of that month and 5 months prior to that month
.
I tried Rangesum(above(sum(volume),0,5)), but I am not getting the desired result.
| ORG_LEVEL_2 | Client_Status | Month | Year | volume | Date |
| REAL ESTATE | Active | 04 | 2016 | 166 | 4/1/2016 |
| REAL ESTATE | Active | 07 | 2015 | 179 | 7/1/2015 |
| REAL ESTATE | Active | 12 | 2015 | 181 | 12/1/2015 |
| REAL ESTATE | Active | 11 | 2015 | 200 | 11/1/2015 |
| REAL ESTATE | Active | 08 | 2015 | 213 | 8/1/2015 |
| REAL ESTATE | Active | 05 | 2015 | 225 | 5/1/2015 |
| REAL ESTATE | Active | 10 | 2015 | 228 | 10/1/2015 |
| REAL ESTATE | Active | 02 | 2016 | 237 | 2/1/2016 |
| REAL ESTATE | Active | 09 | 2015 | 240 | 9/1/2015 |
| REAL ESTATE | Active | 06 | 2015 | 256 | 6/1/2015 |
| REAL ESTATE | Active | 03 | 2016 | 286 | 3/1/2016 |
| REAL ESTATE | Active | 01 | 2016 | 299 | 1/1/2016 |
| CORPORATE | Active | 12 | 2015 | 450 | 12/1/2015 |
| CORPORATE | Active | 04 | 2016 | 520 | 4/1/2016 |
| CORPORATE | Active | 11 | 2015 | 684 | 11/1/2015 |
| CORPORATE | Active | 01 | 2016 | 732 | 1/1/2016 |
| CORPORATE | Active | 08 | 2015 | 752 | 8/1/2015 |
| CORPORATE | Active | 02 | 2016 | 797 | 2/1/2016 |
May be this:
RangeSum(Above(TOTAL Sum(volume), 0, 5))
If that doesn't work, would you be able to provide more details as to what you got and what you wanted? May be a sample would be helpful.
Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations