Forum Discussion
Creating conditional column based on date, IsHoliday
- 4 years ago
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 - Anonymous4 years ago
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