Forum Discussion
pstanek
Post Patron
10 years agoNeed help creating number of week
Hi I use direct query within Power BI and WEEKNUM doesn´t work because Calculated column dax formrmula doesn´t support WEEKNUM in direct query. How can I calculate it within direct Query? I have...
v-sihou-msft
Microsoft Employee
10 years ago
I reproduced same issue as yours, my power bi desktop version is 2.36.4434.381. Even I enable "unrestricted measures" in DirectQuery Option, I still get "not supported" error when adding a calculated column to get the week number from SQL table date column.
I suggest you use DATEPART() get the week number on T-SQL query level.
Regards,
pstanek
Post Patron
10 years agoWhere can I find T SQL level?
File -> Options and Settings -> Options and check that you have allow unrestricted measure ticked.
Is this safe? I am afraid of incorrect results.