Forum Discussion
ricgin
10 years agoRegular Visitor
Days between two dates columns in DirectQuery
Hello community, I tried, unsuccesfuly, to subtract two date in DirectQuery but impossible.. How can I do this?
NRB_UK
9 years agoNew Member
I have been able to get this working by using the DATEVALUE DAX command. This seems to reconfirm that these are Date fields.
Please check the results you get as the first time I tried this the results worked on 90% of the calculations. Had to refresh to ensure all values were correct.
Example :
DATEVALUE(Table_Name[Date_Field_One]) - DATEVALUE(Table_Name[Date_Field_Two])
The returning field can then be formatted as required.