Reputation: 61
I have a date column in my data model. I want to calculate the # of days between today and the date in the column using DAX.
Thoughts?
Upvotes: 3
Views: 19179
Reputation: 47
The accepted answer didn't work for me; there was an error message that today()
wasn't recognized—even though it works well in measures.
The following function worked in the calculated column:
= Date.From(DateTime.LocalNow()) - [my col with date]
Upvotes: 0
Reputation: 407
You can create a calculated column with this formula:
=today()-[DATE]
and change the value of column in numeric:
Upvotes: 3