Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Bug: DirectQuery to Postgres database does not support DAX function WEEKDAY() with ReturnType <> 1

Complete bug report is in the title I think.

I created a connection to a Postgres table in my PBI report using DirectQuery. In DAX, I added a new computed column using the formula:

weekday = WEEKDAY([timestamp], 2)

Which gives me an "OLE DB or OBDC Error" when using the column in a visual.

However, if I change the formula to

weekday = WEEKDAY([timestamp])

or

weekday = WEEKDAY([timestamp], 1)

, the column works without any problems.

If I use Import mode instead of DirectQuery, the original formula works, too.

 

The workaround is obvious, but this should not happen. Hm ...

Status: New
Comments
LinqLover
Frequent Visitor

Also, WEEKDAY(_)/WEEKDAY(_, 1) confuse with returning values in the interval [0, 6] whereas the docs state it should be [1, 7].

v-chuncz-msft
Community Support

@LinqLover 

 

That seems to work fine for me. To help improve MSDN documentation, share feedback on GitHub.

LinqLover
Frequent Visitor

@v-chuncz-msft Could the problem be specific to a system with a German localization (DE-de)?