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
I am trying to create a column that records the week number based on the date found in another column.
Below is a screenshot of what i am trying to accomplish. The column that I have the date stored in is circled in red, and I am trying to get the column "week" to return the week number for the "Date Counted" field.
Solved! Go to Solution.
As @jgeddes mention, use Date.WeekOfYear([Date Counted]), if it doesnot solve your problem, use this one
Date.WeekOfYear(Date.From([Date Counted]))
1. Remove #date() and change it to Date WeekofYear([Date Counted])。
2. The Date.WeekofYear function returns a numerical value, not a date, so type date should not be used at the end of line 15. You can use type number or Int64.Type (if you want it to be an integer)
1. Remove #date() and change it to Date WeekofYear([Date Counted])。
2. The Date.WeekofYear function returns a numerical value, not a date, so type date should not be used at the end of line 15. You can use type number or Int64.Type (if you want it to be an integer)
As @jgeddes mention, use Date.WeekOfYear([Date Counted]), if it doesnot solve your problem, use this one
Date.WeekOfYear(Date.From([Date Counted]))
Does Date.WeekOfYear([Date Counted]) without the #date() wrapper fix your error?
Proud to be a Super User! | |
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!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |