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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Community Champion
Community Champion

@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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.