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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
hctrgrc
Frequent Visitor

I want to measure MTD and PM MTD

Hello! I'm still relatively new to Time Intelligence Measures. Ultimately I want to measure MTD-PM (Month to Date of Previous Month) but it seems I can't even calculate MTD correctly.

hctrgrc_0-1717521047912.png

In the picture, you can see on top the total volume of the month and down on each side is a different approach of MTD (that I remember seeing, one might not be used correctly in this scenario). Firstly, I would expect to see the bar charts in an increasing pattern. If MTD is the cumulative function then I would expect day 2 to be the sum of day 1 + 2 and so on but I'm not seeing this effect. 

 

These are my DAX codes (My Tons volume is a Measure itself, it is not the SUM of a table column):

 

Using DATESMTD

DATESMTD_Tons = CALCULATE(Medidas[Toneladas], DATESMTD(Fecha[DocDate]))

Using TOTALMTD

TOTALMTD_Tons = TOTALMTD(Medidas[Toneladas],Fecha[DocDate])

 

I also have a Day filter on the top right side of the image where I put this DAX codes to the test. I filter through each day but I don't see the summing effect. For instance check day 6 and day 7:

 

hctrgrc_1-1717521347683.pnghctrgrc_2-1717521361349.png

 

I would expect by day 7 to see 104+43 = 147 as my Tons volume. 

 

These are my main relevant model relationships. "Medidas" stands for Measures in Spanish. I'm not sure if somehow my Measures must be connected to my Date table (Fehca in Spanish)

hctrgrc_3-1717521560985.png

 

-.-.-.-.

Once I get this down I would then like to simply calculate with DATEADD (I would guess) the Previous Month. 

 

Hope I'm being clear enough 😄 

 

Thank you very much!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@hctrgrc You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@hctrgrc You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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