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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
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
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.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)