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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

I am working on removing Holidays from a workday formula

I am working on a calendar and I dont want weekends or holidays as seen below. 

 

BillWilli_0-1664822477597.png

 

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous 

In order to provide an accurate formula , hopefully you can provide your sample in the format of a table or pbix file .

 

Best Regards,
Community Support Team _ Ailsa Tao

Anonymous
Not applicable

Hi @Anonymous 

Extracting weekdays from Calendar date is easy, you just need to do it with WEEKDAY() . But for each country, their holiday is different , you need to remove it manually . Taking Chinese New Year's Day as a column, I created a sample .

In China , the New Year's Day are "2022-01-01", "2022-01-02", "2022-01-03" , at the same time "2022-01-01", "2022-01-02" are the weekend , so in the workdays column , the return value does not include the above three dates .

Create a calculated column like below :

 

WorkDate = 
var _daynumber= WEEKDAY('Table'[Date],2)
var _holiday=DATESBETWEEN('Table'[Date],"2022-01-01","2022-01-03")
return if( _daynumber = 6 || _daynumber=7 || 'Table'[Date] in _holiday, BLANK(),'Table'[Date])

 

 The result is shown as below :

Ailsamsft_0-1664874000967.png

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

@Anonymous  and @Greg_Deckler

 

Those two formulas are not working can you think of anything else. 

 

So what I need is I have a table that has employee start dates and total training days based on curriculum. I need to know the end of training date without holidays or weekends.  for example a training class started on 8/15/2022 and it last 24 working days I need to know what the date that training will end on. 

 

thanks, 

Anonymous
Not applicable

That is not working for what I need. I have a column that has total training days. 

@Anonymous Well, I had a Holidays version in the old school way of doing it:

Net Work Days - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Anonymous NETWORKDAYS NETWORKDAYS function (DAX) - DAX | Microsoft Learn



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.