Power BI Date Table code with the week# in format YYWW

Hi @Roger,

Give this a go:

Table.AddColumn( 
    EnterPreviousStepNameHere, "YYWW", each 
    [ShortYear] & Text.PadStart( Text.From([Week Number]), 2, "0"),
    type text 
)

Also you need to add 1 day to the DayCount parameter with this version, as illustrated below.
DayCount = Duration.Days(Duration.From(EndDate - StartDate)) +1

Final note, if you need a ISO-8601 date table, I suggest you make the switch to this one:

I hope his is helpful.

2 Likes