cancel
Showing results for
Did you mean:
Regular Visitor

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.

Sample

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

Re: Rolling total for a calculated measure (matrix)

Hi @analyst31,

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 other members find it more quickly.
3 REPLIES 3
Community Support Team

Re: Rolling total for a calculated measure (matrix)

Hi @analyst31,

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 other members find it more quickly.
Community Support Team

Re: Rolling total for a calculated measure (matrix)

Hi @analyst31,

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 other members find it more quickly.
Regular Visitor

Re: Rolling total for a calculated measure (matrix)

@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

Announcements

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Get your latest community news and announcements.

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 111 members 1,141 guests
Recent signins: