Forum Discussion
Datediff Problem With Direct Query
Hi Marcelo.
Exceptionally in this project, I do not have and cannot optimize the database.
I need to solve it within Power Bi.
I've tried creating custom columns too, but it gives the same error.
Thanks
Keven
You tried to create on Power Query or using DAX? If you used DAX, try doing this using Power Query. If the error persists, than you can calculate the date differences as part of your ETL process before importing the data into Power BI. This would involve writing SQL queries or using database functions to perform the calculation...
- Anonymous2 years agoNot applicable
Only in DAX. I know that it works in Power Query, however, in this project, we only have Direct Query and it is unfeasible to use Power Query, as well as, we cannot solve it in the bank.
The fact is, it's basic arithmetic, which could be easily solved in ETL, Banco or Power Query. But the case specifies the resolution via DAX, as it is in Direct Query.
And the difficulty lies exclusively in DATEDIFF transforming thousands of lines in days, communicating with the Bank in DQ.- marcelsmaglhaes2 years agoSuper User
And if you use a direct dax like dae1 - date2, without datediff function.
- Anonymous2 years agoNot applicable
I tried too, it didn't work. I also tried to transform it into an integer, but it doesn't work via DQ. :s