Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi - I found the code below that will create perpetual holiday for my date calendar in dax, I would like to create the same thing in M (Power query), is this possible?
Solved! Go to Solution.
pls try this
if Date.Month([Date]) = 12 and Date.Day([Date]) = 31 and Date.DayOfWeek([Date], 1 ) = 6 then "New Year's Day (Observed)" else if
Date.Month([Date]) = 1 and Date.Day([Date]) = 2 and Date.DayOfWeek( [Date], 1 ) = 2 then "New Year's Day (Observed)" else if
Date.Month([Date]) = 1 and Date.Day([Date]) = 1 and List.ContainsAny({ Text.From(Date.DayOfWeek([Date], 1 ))} , { "2".."6" })= true then "New Year's Day" else ""pls try this
if Date.Month([Date]) = 12 and Date.Day([Date]) = 31 and Date.DayOfWeek([Date], 1 ) = 6 then "New Year's Day (Observed)" else if
Date.Month([Date]) = 1 and Date.Day([Date]) = 2 and Date.DayOfWeek( [Date], 1 ) = 2 then "New Year's Day (Observed)" else if
Date.Month([Date]) = 1 and Date.Day([Date]) = 1 and List.ContainsAny({ Text.From(Date.DayOfWeek([Date], 1 ))} , { "2".."6" })= true then "New Year's Day" else ""Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 21 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 59 | |
| 52 | |
| 41 | |
| 33 | |
| 32 |