Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SteelChampzz
Helper II
Helper II

Creating a Measure for Working days using dates that represent holidays

I have a Calendar that I've created in DAX and I want to create a column that shows "Is A Working Day"

0=Not a working day
1=Is A Working Day

I want to create a variable calculation where I can include a "Conditional If statement" including Dates in the measure to return "0" for those dates that are holidays.
Example:

5/30/2022 = 0

7/4/2022 = 0

This is how my calendar is laid out

SteelChampzz_0-1666195623067.png

 

And this is my measure for "IsWorkingDay"

SteelChampzz_1-1666195623152.png

 

I feel that I can turn this measure into variables where I can have both "IsWorkingDay" measure and the "IF statement" to create my column.

I'm still very new to creating DAX measure but I'm slowly picking it up.
The help would be greatly appreciated 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Dont dont do it using DAX.  Instead use Power Query

 

Firsly create a list of holidays.

 

speedramps_0-1666199146279.png

 

 


Then create a Calendar tables with contiguous dates.

Merge the calendar with holidays, to add the holiday indicator to the calendar file.

speedramps_1-1666199236790.png

 

 

Add a conditional column

Is working day= IF(Saturday, Sunday or olifay then 0 else 1)

 

speedramps_2-1666199269624.png

 

Do all of these free Power Training courses

https://www.youtube.com/playlist?list=PL7GQQXV5Z8eczWqKFMDVoHMjTcpH3tgZm

 

https://www.youtube.com/playlist?list=PL7GQQXV5Z8eczWqKFMDVoHMjTcpH3tgZm

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

View solution in original post

1 REPLY 1
speedramps
Super User
Super User

Dont dont do it using DAX.  Instead use Power Query

 

Firsly create a list of holidays.

 

speedramps_0-1666199146279.png

 

 


Then create a Calendar tables with contiguous dates.

Merge the calendar with holidays, to add the holiday indicator to the calendar file.

speedramps_1-1666199236790.png

 

 

Add a conditional column

Is working day= IF(Saturday, Sunday or olifay then 0 else 1)

 

speedramps_2-1666199269624.png

 

Do all of these free Power Training courses

https://www.youtube.com/playlist?list=PL7GQQXV5Z8eczWqKFMDVoHMjTcpH3tgZm

 

https://www.youtube.com/playlist?list=PL7GQQXV5Z8eczWqKFMDVoHMjTcpH3tgZm

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.