cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesMartin
New Member

Comparing MTD this month with same period last Month

Hi all,

 

I am wanting to compare this MTD with the same period last month on a cumulative basis.

 

For example:

If today is 13/05/2021, I want the total value for the period 01/04/2021-13/04/2021.

 

I am able to get the running total for the whole previous month but I would like to know how I can get just up until the 13th and then tomorrow for up until the 14th etc.

 

Below is my measure for the whole month:

LastMonthAmount running total in Day =
CALCULATE(
    [LastMonthAmount],
    FILTER(
        ALLSELECTED('Date'[Day]),
        ISONORAFTER('Date'[Day], MAX('Date'[Day]), DESC)
    )
)
 
 
Any help will be greatly appreciated.

 

 

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @JamesMartin ,

 

Please refer to similar threads, hope to help you.

https://community.powerbi.com/t5/Desktop/Dax-Same-period-last-months/m-p/837432 

https://community.powerbi.com/t5/Desktop/Calculation-for-Last-month-Same-Period/m-p/730183 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @JamesMartin ,

 

Please refer to similar threads, hope to help you.

https://community.powerbi.com/t5/Desktop/Dax-Same-period-last-months/m-p/837432 

https://community.powerbi.com/t5/Desktop/Calculation-for-Last-month-Same-Period/m-p/730183 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.