Forum Discussion
Calendar Week Delegation Failed at Databricks SQL Warehouse
- 11 months ago
Hello loujiang,
Thank you for the update. I'm glad to hear you've successfully resolved the issue by using a native query to handle the calendar week calculation before query folding kicks in. That's a smart and efficient workaround and it's great that it's working for you now.
Regarding your question: Yes, this appears to be a compatibility issue (or bug) in how Power BI's query folding translates the "Week of Year" transformation to SQL for the Databricks connector, delegating an unsupported week() function instead of the Databricks-compatible weekofyear().
However, there's no specific confirmation yet that this exact week() delegation issue is fixed in upcoming versions. We recommend raising it in the Ideas forum (Fabric Ideas - Microsoft Fabric Community) and upvoting it so the internal team can review and prioritize it for implementation soon.
Thanks again for the resolution update; it'll help others searching for similar issues.
Best regards,
Ganesh Singamshetty
Hello,
Thanks for the hint. Here is my test on the Databricks SQL:
But if I change to the weekofyear(), it will work:
Hi loujiang,
Thank you for reaching out to the Microsoft fabric community forum.
it seems we’re on the right track with weekofyear() working in Databricks SQL, but the issue with Power BI’s query folding hasn’t been fully resolved yet. Please try one of the workarounds suggested (e.g., custom SQL with weekofyear(), disabling query folding with Table.Buffer() or using DAX WEEKNUM()) and let us know if it works. This will help us confirm a solution and assist other members facing similar issues.
Thank you, audreygerred, for sharing valuable insights. Your suggestion to verify the SQL dialect and check privileges helped clarify the issue. We appreciate your efforts in supporting the community.
Best regards,
Ganesh Singamshetty.
- loujiang11 months agoFrequent Visitor
Hello,
Thanks for the suggestion. I resolved my issue with native query defined before qurey fording to generate the calander week by myself.
Would you please inform, if this is view as a bug of Power BI and will it be solved in the upcoming versions?
best wishes
loujiang
- v-ssriganesh11 months agoCommunity Support
Hello loujiang,
Thank you for the update. I'm glad to hear you've successfully resolved the issue by using a native query to handle the calendar week calculation before query folding kicks in. That's a smart and efficient workaround and it's great that it's working for you now.
Regarding your question: Yes, this appears to be a compatibility issue (or bug) in how Power BI's query folding translates the "Week of Year" transformation to SQL for the Databricks connector, delegating an unsupported week() function instead of the Databricks-compatible weekofyear().
However, there's no specific confirmation yet that this exact week() delegation issue is fixed in upcoming versions. We recommend raising it in the Ideas forum (Fabric Ideas - Microsoft Fabric Community) and upvoting it so the internal team can review and prioritize it for implementation soon.
Thanks again for the resolution update; it'll help others searching for similar issues.
Best regards,
Ganesh Singamshetty- loujiang11 months agoFrequent Visitor
Thanks for the hint and suggestions!