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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 -
    COUNT('01 - Open Data'[File #]),
        '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 **//


Super User
Super User

@AppGuySCS You may find this helpful -

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

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!:
The Definitive Guide to Power Query (M)

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

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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