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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

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 🙂

## Helpful resources

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

#### Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors
Top Kudoed Authors