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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
dunna
Advocate I
Advocate I

Rolling Sum Using Virtual Table

Hello,

 

I am struggling to get the desired output and could use some assistance if anyone can help. At a high level I am doing a rolling monthly sum but when a given month has an hours value higher than the total hours in a given month then it switches to the total hours in a month. There is a limitation with this has to be a calculated measure and cannot be done in PQ or with calculated tables/columns. 

When I put it into a table with the 'ID_TBL'[UUID] and 'Date'[Month Start Date] columns the measure result is just the ending months [Adjusted Monthly Hrs] value. The table below is an example of what the virtual table shows (first 5 columns) and then the actual output for 9/1/2024 (column 6) and what the desired/expected outcome to be (column 7)

 

UUIDMonth Start DateHrsAvail HoursAdj HrsRolling SumDesired Outcome
17/1/2024661.00744.00661.00  
18/1/20241,409.40744.00744.00  
19/1/2024666.50720.00666.50666.502,071.50

 

Below is the calculated measure being used:

dunna_0-1731083324500.png

 

Thanks in advance for any hep, it is much appreicated!

1 ACCEPTED SOLUTION
dunna
Advocate I
Advocate I

I was able to resolve this issue with the below code.

 

dunna_0-1731103924427.png

 

View solution in original post

2 REPLIES 2
dunna
Advocate I
Advocate I

I was able to resolve this issue with the below code.

 

dunna_0-1731103924427.png

 

Anonymous
Not applicable

Hi,@dunna 
We are delighted that you have found a solution and are willing to share it.

 

Accepting your post as the solution is incredibly helpful to our community, as it enables members with similar issues to find answers more quickly.

 

Thank you for your valuable contribution to the community, and we wish you all the best in your work.

 

Best Regards,

Leroy Lu

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.