This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello Guys
I have a Calendar Table and i would like to add a collumn which contains all public holidays.
Is there some script which i can use to generate it?
Thanks
Solved! Go to Solution.
Hi @avioti,
Current power bi not contains any script to auto generate the holiday calendar table.
You should get a holiday list first, for example:
1. Find out a public holiday list from web, import it to power bi.
2. Create a calendar table and build the relationship.
DateTable = ADDCOLUMNS(CALENDAR(DATE(2015,1,1),TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmmm"),"Quarter",FORMAT([Date],"q"),"Week",WEEKNUM([Date],1),"Day Of Week",FORMAT([Date],"dddd"))
3. Add calculated column to check relationship.(holiday = normal holiday + public holiday)
Holiday Tag = IF(ISBLANK(RELATED(Holiday[Federal holiday]))=FALSE(),RELATED(Holiday[Federal holiday]),if([Day Of Week]="Saturday"||[Day Of Week]="Sunday",[Day Of Week],BLANK()))
BTW, you can also share your requirement to ideas.
Regards,
Xiaoxin Sheng
You can find a list with more than 10 sources of public holidays all over the world in the post below. The list also contains some DimDate tables very detailed, especially for USA holidays.
https://www.linkedin.com/pulse/find-here-many-lists-public-holidays-wederley-m-miranda
Hi @avioti,
Current power bi not contains any script to auto generate the holiday calendar table.
You should get a holiday list first, for example:
1. Find out a public holiday list from web, import it to power bi.
2. Create a calendar table and build the relationship.
DateTable = ADDCOLUMNS(CALENDAR(DATE(2015,1,1),TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmmm"),"Quarter",FORMAT([Date],"q"),"Week",WEEKNUM([Date],1),"Day Of Week",FORMAT([Date],"dddd"))
3. Add calculated column to check relationship.(holiday = normal holiday + public holiday)
Holiday Tag = IF(ISBLANK(RELATED(Holiday[Federal holiday]))=FALSE(),RELATED(Holiday[Federal holiday]),if([Day Of Week]="Saturday"||[Day Of Week]="Sunday",[Day Of Week],BLANK()))
BTW, you can also share your requirement to ideas.
Regards,
Xiaoxin Sheng
Hi, you might take a look here if you need to do it with Power Query instead of dax. I put it here if someone has the same issue. https://github.com/FotMac/powerquery-public-holidays-gr
Hi - I know this is not a recent post - but I found the solution whilst searching for an answer to an issue I had, and it has helped me out with what I needed to do. Thanks for the solution and for posting!
I recommend just finding a web based source, based on your country, where you can pull in a table of dates that are holidays and then merge this with your existing date table.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 48 | |
| 29 | |
| 23 | |
| 23 |