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,
elliotdixon
Responsive Resident
10 years agoHi v-sihou-msft how did you get on with finding a solution to this? I have allowed the unrestricted measures but still cannot get the WEEKNUM working on Direct Query mode.
Cheers,
ED.