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
AppGuySCS
Frequent Visitor

PMTD Measure Not Correct - KPIs wrong

I'm still relatively new to Power BI and the one area I'm having consistent struggle with is the MTD and PMTD measures. 

The measures are built using these variations (I've tested them all and can't seem to get the same number as when I drop the column into the Card and then add the Relative Date n filter of "In the Last 1 Calendar Month"). I don't need prior MTD/YTD, I need actual calendar month total. 

Test #1 - 

CALCULATE(COUNT('01 - Open Data'[File #]), DATESMTD(ENDOFMONTH(dateadd('02 - Date Table'[Date],-1,MONTH))))
Returns YTD/MTD Total (not correct for Jan 2024)

Test #2 -
PMTD Opens = CALCULATE(
    COUNT('01 - Open Data'[File #]),
    FILTER(
        '01 - Open Data',
        '01 - Open Data'[Open Date].[Date] >= DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, 1) &&
        '01 - Open Data'[Open Date].[Date] <= DATE(YEAR(TODAY()), MONTH(TODAY()) - 1, DAY(TODAY()))
    )
)
Returns a value of 621 that is approximately 1/5th of the prior month actual total of 3,586. 

The correct total for the month of January 2024 should be 3,586. 

What's even more odd, is this measure only fails to pull the correct number on Open File Counts. My closed measures are all spot-on. 

I'm using the auto date/time intelligence and I have built a custom date table (marked as a date table) but isn't related to the core data because it goes a little crazy. 

A copy of my PBI file cannot be uploaded due to the amount of data and the time required to sanitize it. 

Any help would be much appreciated. I've combed the forums and read a hundred articles on time intelligence, but this answer elludes me. 

//** UPDATED INFO **//
AppGuySCS_0-1707257373504.pngAppGuySCS_1-1707257382976.png

 



2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@AppGuySCS 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...

Thanks @Greg_Deckler , I'll give this a read. 

Here's a little more detail to my question:


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.