Forum Discussion
Subtracting a date from today
I am trying to find the number of days from a date field to today and have searched the posts but cannot find what I need. When I use datediff e.g. - Note: I have to use DirectQuery mode.
DATEDIFF (table.field, today(), DAY) I get:
Error Message:
OLE DB or ODBC error: [Expression.Error] Local evaluation of Table.Join or Table.NestedJoin with key equality comparers is not supported..
I have also tried DATEVALUE subtract but still get the same error
It has been suggested that the underlying field is a datetime and that is why it is not working, but I did change the datetime to a short date in the editor, but still no joy.
Can anyone suggest anything else
1 Reply
- Arul
Super User
Anonymous ,
I am not fully sure about the exact solution based on my research but people were facing this issue earlier as well who are all using the Direct Query. Could please go through the below thread and check if it helps or not?
I think the problem is with one of the key which relating tables.https://community.powerbi.com/t5/Desktop/DirectQuery-in-Composite-Model/td-p/990862