Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a calculated column in my report called ReportWeek.
It is defined as ReportWeek = WEEKNUM(NewData[ReportTime];1)
That works great, but if I change the number 1 to 2 like this, it fails:
ReportWeek = WEEKNUM(NewData[ReportTime];2)
The error is: Function 'WEEKNUM' is not allowed as part of calculated column DAX expressions on DirectQuery models.
How does that make sense and what can I do to make it work?
Best regards,
Erik
Solved! Go to Solution.
I’ve got response from the Product Team.
In DirectQuery mode, DAX formulas of calculated columns are limited to those which can be translated to SQL in an efficient matter. While it is possible to do so for WEEKNUM when return_type is set to 1, we haven't found an equivalent translation when return_type is 2. So this is a by design behavior of the product.
Best Regards,
Herbert
I’ve got response from the Product Team.
In DirectQuery mode, DAX formulas of calculated columns are limited to those which can be translated to SQL in an efficient matter. While it is possible to do so for WEEKNUM when return_type is set to 1, we haven't found an equivalent translation when return_type is 2. So this is a by design behavior of the product.
Best Regards,
Herbert
Hi @Hougaard77,
I can reproduce your scenario and I have reported internally. I will post the update if there is any response.
Best Regards,
Angelia
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!