2 Replies Latest reply on Aug 2, 2016 12:07 PM by Vamsi Garapati

# Sum of Last rolling12 months Data for each Month Date Field

Hi All,

I have a scenario  where i have to show past 12 months data for each Diaplayed month as shown below,So can you please let me know the process to achieve this

Thanks you

• ###### 1. Re: Sum of Last rolling12 months Data for each Month Date Field

Hi Vamsi,

This could be achieved using a (moving window) Table Calculation, namely:

WINDOW_SUM( SUM([Sales]), -11, 0)

Having Years/Months of [Order Date] as a Dimension on a view

(in Columns as on your image, but could be in Details),

the table calculation should be Addressing as such:

Compute using --> Order Date

At the Level of --> Months (or Deepest, if Months is a lowest level).

Hope this could help.

Yours,

Yuri

PS One could make it from SUM([Sales]) Green Pill straight on a view:

Right-Click on a Pill --> Quick Table Calculation --> Moving Average

Right-Click on a Pill (again) --> Edit Table Calculation --> Change Average to Sum

and Choose the proper Addressing (Compute using / At the Level) and window size.

1 of 1 people found this helpful
• ###### 2. Re: Sum of Last rolling12 months Data for each Month Date Field

Hi Yuri,

Thank you very much,Its exactly working for  me:-)