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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

PowerBi Rolling Sum

Hi All,

I have a project where I need to create a rolling Sum.

I have three tables involved,  VScrapRates, VdateDim, and totalscrap.

Rolling Sum 1.JPG

 

My current DAX calculation is as follows:

Rolling12MonthScrap =
CALCULATE(
Sum(TotalScrap[InitalDollars]),
DATESINPERIOD( VDateDim[Date], LASTDATE( VDateDim[Date] ), -12, MONTH ) )
 
The date dim table is a date table and is tied to a timeline slicer.  When the user selects a month on the slicer we want to sum the rolling 12 months of initial dollars from the total scrap table from the selected month backwards.
 
However, this is what I'm getting.  The second row is correct and I have no idea where the first row comes from.  Ideas?
rESULT.JPG
 
Thanks in advance,
K.
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , is one of the other your columns un summarized?

Also, make sure yearmonth is coming from VDateDim and it is marked as date table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

VDateDim is marked as a date table.  

If I remove every column except Corporate scrap percentage from VscrapRates in the table it still happens.

If I remove every visual filter, still happens.

If I change the slicer attached to VdateDim, the value remains constant.

It may be that CorporateScrapPercentage is not summarized.  Suggestions on what to try?

Capture2.JPG

 

 

 

 

Anonymous
Not applicable

Thanks, it steered me in the correct direction.  It was an issue where there was no relationship between VscrapRates[plant] and TotalScrap[Plant].

Cleaned up relationships, modified and added some measures and everything is working.

Thanks for steering me in the right direction.

 

K.

amitchandak
Super User
Super User

@Anonymous , is one of the other your columns un summarized?

Also, make sure yearmonth is coming from VDateDim and it is marked as date table

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.