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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
adam_mac
Helper I
Helper I

Same period last month showing total month

I am using the below DAX formula to calculate prior months sales for same period as current month. For some reason however it is showing total month instead of just showing a few days of the month. I am ultimately looking to compare the net fee for 1-8 Dec against the same period in November. Attaching the raw data from excel that it should be comparing. 

 

PrevMTDSales = CALCULATE([TotalSales (NetValue)], DATEADD(FILTER(DATESMTD(Finance_Sales[PurchaseDate]),Finance_Sales[PurchaseDate]<TODAY()),-1,MONTH))

 

My "PurchaseDate" column is set as a date format so its not because of that. Any ideas why its not working?

 

1.PNG2.PNG

 

1 ACCEPTED SOLUTION
daxer-almighty
Solution Sage
Solution Sage

Time-intel functions work correctly ONLY on proper date tables, not on any tables with date columns. And what you're doing is exactly this: you're trying to use them directly on a fact table. No. This will never work.

View solution in original post

1 REPLY 1
daxer-almighty
Solution Sage
Solution Sage

Time-intel functions work correctly ONLY on proper date tables, not on any tables with date columns. And what you're doing is exactly this: you're trying to use them directly on a fact table. No. This will never work.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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