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
Hi All,
I have a column of datetimes for all of 2019 and I want to create a conditional column 'IsHoliday' that is '1' if that date is a public holiday, and '0' otherwise.
I imagine for New Year's Day it would be something like:
IsHoliday = IF( 'Table'[Date] = DATE(2019,1,1), 1, 0)
However this only returns '1 'for one value but not all the the other datetimes on that date.
Any help would be appreciated.
Brian
Solved! Go to Solution.
@Anonymous , weekend are easy, for public holday you might have use API, refer this power bi solution for that
Work Day = if(WEEKDAY([Date],2)>=6,0,1)
you can lso copy holday from other tables to date table
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
Hi @Anonymous ,
You need to get a list of holidays online, such as the following:
Establish the relationship between the calendar table and the holiday table
Then add a calculated column behind the calendar table
IsHoliday =
IF(
ISBLANK(RELATED('2019 Holiday'[Date]))=FALSE(),
1,0)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You need to get a list of holidays online, such as the following:
Establish the relationship between the calendar table and the holiday table
Then add a calculated column behind the calendar table
IsHoliday =
IF(
ISBLANK(RELATED('2019 Holiday'[Date]))=FALSE(),
1,0)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Awesome mate, cheers
@Anonymous , weekend are easy, for public holday you might have use API, refer this power bi solution for that
Work Day = if(WEEKDAY([Date],2)>=6,0,1)
you can lso copy holday from other tables to date table
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
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 |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 31 | |
| 24 | |
| 23 |