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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Rolling total for a calculated measure (matrix)

Hi,

 

 

I have a matrix that shows a variance between my budget and expense, or revenue. There is a measure that calculates the variance % and it works fine. One thing id like to change about it is have it rolling forward instead just that months variance percentage. So for example, if September is 10% spent and then October another 10% spent, October will show 20%. In the total it will show the final total %, but i havent been able to apply conditional formating to the grand totals, and would like to try that out later on maybe.

 

Here is my current measures code.

% Spent Revenue = IFERROR(CALCULATE(SUM(GLEntry[Revenue]))/CALCULATE(MAX(GLEntry[Revenue Budget])),0)

 

Here is a sample picture. 

 

 SampleSample

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.


Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.


Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

To update your formula as below.

 

% Spent Revenue =
IFERROR (
    CALCULATE (
        SUM ( GLEntry[Revenue] ),
        FILTER (
            ALL ( GLEntry ),
            GLEntry[date].[MonthNo] <= MAX ( GLEntry[date].[MonthNo] )
        )
    )
        / CALCULATE ( MAX ( GLEntry[Revenue Budget] ) ),
    0
)

If it doesn't work, kindly share your pbix or smaple data to me. Please upload the file to One Drive and share the link here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

@v-frfei-msft

 

 

It seemed to work on my revenue but not my expenses, i think that is because my expenses are broken out by department and have sepate budgets, unlike revenue. 

 

For this example i have two department payrolls in separate matrix, then filtered to only be that certain department. Here is what they look like. I have also added a OneDrive link to the two tables that are used for these matrix. 

 

Excel file for tables

 

3.JPG

 

 

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors