Hi,
How to calculate period day betwen two date.
First Date is Created Date
Second Date is TODAY date.
Thanks
Solved! Go to Solution.
If you want to use DAX to create a calculated column, you can use this formula
Measure = DATEDIFF("2017-03-20", TODAY(), DAY)
This Formula returns the difference from the 20th of March 2017 until today in days. I used a constant for the StartDate. You have to replace "2017-03-20" by 'your tablename'[your columnname] to reference a column in on one of your tables.
Hope this helps
Is it possible your dates are in different formats? ie DD/MM/YYYY versus MM/DD/YYYY
The dax formula submitted already is right.
DATEDIFF(MyTable[Start Date], MyTable[End Date], DAY) for number of days
DATEDIFF(MyTable[Start Date], MyTable[End Date], YEAR) for number of years
Is it possible your dates are in different formats? ie DD/MM/YYYY versus MM/DD/YYYY
The dax formula submitted already is right.
DATEDIFF(MyTable[Start Date], MyTable[End Date], DAY) for number of days
DATEDIFF(MyTable[Start Date], MyTable[End Date], YEAR) for number of years
If you want to use DAX to create a calculated column, you can use this formula
Measure = DATEDIFF("2017-03-20", TODAY(), DAY)
This Formula returns the difference from the 20th of March 2017 until today in days. I used a constant for the StartDate. You have to replace "2017-03-20" by 'your tablename'[your columnname] to reference a column in on one of your tables.
Hope this helps
Hi @TomMartens,
Its doest work for me. The error state the start date cannot be grater than the end date althougt created date is lower than TODAY date.
Thanks
User | Count |
---|---|
218 | |
74 | |
70 | |
69 | |
53 |
User | Count |
---|---|
188 | |
93 | |
77 | |
77 | |
67 |