// Calendar 2026 // Pack: Calendar table with closure days (Power Query Exercises, https://powerqueryexercises.com/downloads/calendar-closure-days) // // Source bindings // In the Power Query Exercises simulator each name below is bound directly to a pack file. In Excel or // Power BI Desktop the first steps of this query do that binding instead: // ClosureDays the pack file closure-days.csv -> File.Contents(PackFolder & "closure-days.csv") // Set PackFolder to the folder where you extracted the pack (keep the trailing backslash). // // Validated in the Power Query Exercises simulator (engine 0.1.0) against this pack's files; it returns // 365 rows with columns Date, Month, MonthName, WeekStart, IsWeekend, IsClosure. // It has not been run in Excel or Power BI by us. This is query text, not a ready-to-refresh workbook. // Independent practice material; not affiliated with or endorsed by Microsoft. let PackFolder = "C:\PQE\calendar-closure-days\", ClosureDays = File.Contents(PackFolder & "closure-days.csv"), Closures = Table.TransformColumnTypes(Table.PromoteHeaders(Csv.Document(ClosureDays, [Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv])), {{"Date", type date}}), #"Dates" = List.Dates(#date(2026, 1, 1), 365, #duration(1, 0, 0, 0)), #"Table" = Table.FromList(#"Dates", Splitter.SplitByNothing(), {"Date"}), #"Typed" = Table.TransformColumnTypes(#"Table", {{"Date", type date}}), #"Month" = Table.AddColumn(#"Typed", "Month", each Date.Month([Date]), Int64.Type), #"Month name" = Table.AddColumn(#"Month", "MonthName", each Date.ToText([Date], "MMM"), type text), #"Week start" = Table.AddColumn(#"Month name", "WeekStart", each Date.StartOfWeek([Date], Day.Monday), type date), #"Weekend" = Table.AddColumn(#"Week start", "IsWeekend", each Date.DayOfWeek([Date], Day.Monday) >= 5, type logical), #"Closed" = Table.AddColumn(#"Weekend", "IsClosure", each List.Contains(Closures[Date], [Date]), type logical) in #"Closed"