Forum Discussion
CM vs PM
- 6 years ago
Anonymous are you getting any error or not getting any result. What is the issue? Can you share relationship diagram and the measure you used for PM
- 6 years ago
You can also use datesmtd or totalmtd with date calendar
Example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date])) last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH))) last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH)))) last year MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s.
Refer
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
Anonymous add calendar dimension in your model, there are many blog posts on how to add one and then use previousmonth or other time intelligence DAX function to get PM.
- Anonymous6 years agoNot applicable
I have a calendar table (from Avi Singh) in the dashboard that is tied to the data table. I have tried previousmonth various different ways and nothing has worked.
- parry2k6 years ago
Super User
Anonymous are you getting any error or not getting any result. What is the issue? Can you share relationship diagram and the measure you used for PM