cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Post Patron

## Month over Month of running totals (cumulative)

Hello Guys,

everyone knows the quick measure of running totals or the DAX function YTD. I want to calculate the month over month change of a running total.

Is there a best practice dax expression?

1 ACCEPTED SOLUTION
Post Patron

I have found it out myself. It seems to be working. Here the resolution

```1. Step: Sum the initial variable "Sales"
sales = SUM( [Sales] )

2. Step: Calculate the cumulated value of "sales"
sales **bleep** =
CALCULATE(
[Sales];
FILTER(
ALLSELECTED([Date]);
ISONORAFTER([Date]; MAX([Date]); DESC)
)
)

3. Step: Calculate the percentage difference between 1 and 2
Sales **bleep** MoM% =
DIVIDE(
[Sales] ;
[Sales **bleep**] - [Sales] ;
0
)```
3 REPLIES 3
Post Patron

I have found it out myself. It seems to be working. Here the resolution

```1. Step: Sum the initial variable "Sales"
sales = SUM( [Sales] )

2. Step: Calculate the cumulated value of "sales"
sales **bleep** =
CALCULATE(
[Sales];
FILTER(
ALLSELECTED([Date]);
ISONORAFTER([Date]; MAX([Date]); DESC)
)
)

3. Step: Calculate the percentage difference between 1 and 2
Sales **bleep** MoM% =
DIVIDE(
[Sales] ;
[Sales **bleep**] - [Sales] ;
0
)```
Solution Sage

Ok then may I ask you to mark your post as solution so others can find it more easily?

Solution Sage

So you mean Month-to-Date?

Like this here?

If the post was helpful pls mark it as solution and share sume kudos 🙂

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors