Forum Discussion
Datediff not recognized
So I've got this problem:
And I've gotten this far:
Can somebody please explain what I need to do? I have 0 experience with this.
Hi WFKoth ,
You mistake it for M query. You need to use this DAX to create a new column.
If all you want is M query, you could try Duration.Hour() to get time difference.
3 Replies
- Greg_DecklerCommunity Champion
You need to do one of two things:
- Move that code into the Desktop as it is DAX code, not M code
- Figure out the equivalent M code
- amitchandakSuper User
To take datediff in M refer
Datediff is there in dax.
Please refer to this file, this has few ways to take date diff.
Check for Way1,2,3,
https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0
- v-eachen-msftCommunity Support
Hi WFKoth ,
You mistake it for M query. You need to use this DAX to create a new column.
If all you want is M query, you could try Duration.Hour() to get time difference.