Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
DevadathanK
Resolver I
Resolver I

Calculating Week Start Date from Week Number

Hi Community!

<Message deleted>

Thanks for any help!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @DevadathanK 

1.

Transform data;

select "Year" and "WeekNumber", select Remove rows->Remove duplicates;

close&&apply

 

2.

create a date table

date =
VAR minyear =
    MIN ( 'Table'[Year] )
VAR maxyear =
    MAX ( 'Table'[Year] )
VAR datetable =
    CALENDAR (
        DATE ( minyear, 1, 1 ),
        DATE ( maxyear, 12, 31 )
    )
RETURN
    ADDCOLUMNS (
        datetable,
        "year", YEAR ( [Date] ),
        "month", MONTH ( [Date] ),
        "week", WEEKNUM ( [Date] ),
        "year-week", FORMAT (
            [Date],
            "yyyy-ww"
        ),
        "weekday", WEEKDAY (
            [Date],
            2
        )
    )

 

3.

Create a calculated column in main table

year-week = [Year]&"-"&[Weeknumber]

 

4. 

create a relationship between two tables based on "year-weeknumber".

 

5. create calculated columns in main table

weekstart = CALCULATE(MIN('date'[Date]),ALLEXCEPT('Table','Table'[year-week]))

Capture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @DevadathanK 

1.

Transform data;

select "Year" and "WeekNumber", select Remove rows->Remove duplicates;

close&&apply

 

2.

create a date table

date =
VAR minyear =
    MIN ( 'Table'[Year] )
VAR maxyear =
    MAX ( 'Table'[Year] )
VAR datetable =
    CALENDAR (
        DATE ( minyear, 1, 1 ),
        DATE ( maxyear, 12, 31 )
    )
RETURN
    ADDCOLUMNS (
        datetable,
        "year", YEAR ( [Date] ),
        "month", MONTH ( [Date] ),
        "week", WEEKNUM ( [Date] ),
        "year-week", FORMAT (
            [Date],
            "yyyy-ww"
        ),
        "weekday", WEEKDAY (
            [Date],
            2
        )
    )

 

3.

Create a calculated column in main table

year-week = [Year]&"-"&[Weeknumber]

 

4. 

create a relationship between two tables based on "year-weeknumber".

 

5. create calculated columns in main table

weekstart = CALCULATE(MIN('date'[Date]),ALLEXCEPT('Table','Table'[year-week]))

Capture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@DevadathanK 

This was done using YYYYWW or YYYY-WW

Weektodate = date(RIGHT(Table[Week Format],4),1,1)+(mid(Table[Week Format],5,SEARCH(" ",Table[Week Format])-5 )*7) - (WEEKDAY(date(RIGHT(Table[Week Format],4),1,1)))

 

Give some sample data

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi

I have 2 columns, one for the WeekNumber and another for the Year. 

<Message deleted>

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.