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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
murphm6
Helper II
Helper II

Rolling 12 month sum for a summarized table

Hi all,

 

Can anyone assist me in creating a calculated column that is a running total of volume? I have two tables

 

- Receipt Table (Original table)

- RawPVM table (summarized the receipt table to get unique combinations of product codes and month/year

 

I summed the volume from the receipt table in a calculated column in the RawPVM table. I would like to calculate a running total of this aggregated sum by product code and month/year. Does anyone know how to do this? The values i'm getting aren't matching what i'm expecting to see as the current month is being excluded. For example:

 

murphm6_0-1684944588828.png

 

In this example - i would expect the 'Rolling 12 Month Sum' column for 2/1/16 to have a value of 23800

Then 4/1/16 should be 30600, etc..

 

any ideas?

 

2 REPLIES 2
Greg_Deckler
Super User
Super User

@murphm6 This shows how to create a running total:

And this one shows a rolling average, just replace AVERAGEX with SUMX:


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hey Greg, 

 

That method doesn't consider the product code when doing the running total - i would like to have the running total be for the aggregate sum by code and date, not the total for the whole table

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.