Hi ea you can do it like this in the query editor: let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Vc7BCcAwDATBXvwOyCfHklyLcf9tBAIhd8957e7dwnyad1Q716sQpahEizX6rzQwnDEYN2MygpGMYiyJ6oI8QCYgF5ANfB/nAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Request Date" = _t]), AllDates = Table.TransformColumnTypes(Source,{{"Request Date", type date}}), Source2 = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtM3MtU3MjC0UNJRMtc3hDENlWJ1ooECRgg5CxjTCCpniaQPboaxUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Start Date" = _t, #"End Date" = _t, Week = _t]), WkRng = Table.TransformColumnTypes(Source2,{{"Start Date", type date}, {"End Date", type date}, {"Week", Int64.Type}}), fnGetWeekRow = (dt as date, tbl as table) as table => Table.SelectRows(tbl, each [Start Date] <= dt and [End Date] >= dt), AddedWeek = Table.AddColumn(AllDates, "WeekNum", each fnGetWeekRow([Request Date], WkRng), type table), ExpandedWeekNum = Table.ExpandTableColumn(AddedWeek, "WeekNum", {"Week"}, {"Week"}) in ExpandedWeekNum
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut! 