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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Super User
Super User

@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!:
Power BI Cookbook Third Edition (Color)

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.