Forum Discussion
Date issue
Hi Anonymous ,
You may select on the column [Closure Date], go to Column tools->Data type, change the data type to Date, do the same with column [Creation Date]. Then you may create measure instead of calculated column like DAX below.
Measure= DATEDIFF(MAX(Table1[Creation Date]),MAX(Table1[Closure Date]),DAY)
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Thanks Amy, but it is "kind of" a format date already but I still cannot use the Dax measure:
- v-xicai5 years ago
Community Support
Hi Anonymous ,
Based on my test which connect to SQL Server database using DirectQuery Mode in the latest version of Power BI Desktop, the DATEDIFF function works well.
DateDiff = DATEDIFF(MAX(Sales[CreationDate]),MAX(Sales[ClosureDate]),DAY)>>Thanks Amy, but it is "kind of" a format date already but I still cannot use the Dax measure:
Is there any error message to appear when you create this measure?
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.