Forum Discussion
Cannot save a query for live connection
AverageAsker For DirectQuery connections to work, the PowerQuery transformation needs to be mapped to SQL statements. ToLocal() isn't one of those operators that can be translated.
Maybe you can translate it locally once it's loaded in the Model, create a calculated column and do something like = [DateTimeOffset] - TIME(11,0,0) (for 11 hours of difference)
Hi, I found this and it is explaining why I am seeing the error: You cannot add calculated columns or tables so Calculated Columns is not an option unfortunately.
- pqian10 years agoMicrosoft Employee
AverageAsker I haven't tried it, so I can't tell for sure. But you can try adding a calculation in PowerQuery, or cast the type to DateTime (I know in SQL casting to datetime usual translates to local time)
- AverageAsker10 years agoHelper I
If a calculation in PowerQuery involes Custom Column, then, it doeesn't work as explained above. If you didn't mean Custom Column - can you provide more specifics?
I ended up solving my problem by making all the transformations in SQL.
- konstantinos10 years agoMemorable Member
AverageAsker pqian Although I never tried it yet the latest powerBI desktop supports calculated columns
https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-latest-update/
- AverageAsker10 years agoHelper I
As for the latest Power BI Desktop:
that link says that the following
DirectQuery – support for creating Calculated Columns
is supported in the version February 2016 Update (2.32.4307.362)
But I have a newer version and the problem still exists there so the release notes seem to be inaccurate.