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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Is there a way, similar to WeekNum, but in reverse and convert Calendar Weeks to Dates?
The Calendar week format coming from the data source is 01.2020.
Thanks in advance.
Sure, the basic technique is:
Date Column =
VAR __Year = [Year]
VAR __Week = [WeekNum]
VAR __Calendar =
ADDCOLUMNS(
CALENDAR(DATE(__Year - 1,1,1),DATE(__Year + 1,12,31)),
"__WeekNum",WEEKNUM([Date])
)
RETURN
MINX(FILTER(__Calendar,[__WeekNum] = __Week),[Date])
Thanks, and sorry for the delay in getting back to you. First question, I notice the date column is showing 2019, when it should be 2020.
I had a play with your code and the reason the year is 2019 is because of "-" in the below line, but dont know how to correct.
Does anyoen know why the year is showing 2019, and not the actual year in the column, 2020? Plus, how to change th calendar week begin date from the Tuesday to the Monday?
Anyone?
Found an alternative soultion.
ndate = DATE([year],1,-2)-WEEKDAY(DATE([year],1,3))+[week]*7
Just testing now.