Forum Discussion
Power BI Desktop DATESMTD Measure
Hello,
I'm fairly new to Power BI and currently using PBI Desktop to develope and publish. I'm having trouble with a measure that is not calculating the date corretly. I have 2 queries with a relationship connected together.
This is my measure :
DATESMTD resets counting every month. you probably don't have any records for "Cluster Plan"[AVERAGE_PER_DAY_US] for months of March yet.
Another problem could be that DATESMTD is not applied to calendar table (table which is related to fact table with dates starting from Jan 1 through Dec 31 and daily granularity).
without seeing that model it's hard to fix the problem.
For any time intelligence function, you could implement a custom DAX formula.
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/
5 Replies
- Greg_DecklerCommunity Champion
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-TITHW/m-p/434008 - bogomdaResolver I
DATESMTD resets counting every month. you probably don't have any records for "Cluster Plan"[AVERAGE_PER_DAY_US] for months of March yet.
Another problem could be that DATESMTD is not applied to calendar table (table which is related to fact table with dates starting from Jan 1 through Dec 31 and daily granularity).
without seeing that model it's hard to fix the problem.
- v-chuncz-msftCommunity Support
For any time intelligence function, you could implement a custom DAX formula.
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/