Skip to main content
cancel
Showing results for 
Search instead 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.

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
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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