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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX (NetWorkDays)

Hi all,

 

How to calculate the number of working days  in PowerBI by dates?

 

For eg: In excel, I have dates starting from 5/7/21 to 8/5/21 which is 91 days.

And to calculate working days, I have used =NETWORKDAYS(B6,CN6).

 

How can I implement the same in PowerBI? 

 

Any help is appreciated!

 

Thank you!

Megha

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous ,

Please refer to the following steps to see if it helps you.

  1. Prerequisite should include a date range
  2. Create DAX logic to generate a column that calculates Total Workdays excluding weekends
  3. Create DAX logic that calculates Total Workdays excluding public holidays
  4. Verify the final output using filters in the DatesTable

More details:Calculate Working Days in Power BI 

 

I have also found a similar post, please refer to it to see if it helps you.

https://community.powerbi.com/t5/Desktop/WORKDAY-formula-in-Power-BI/m-p/202383

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ValtteriN
Super User
Super User

Hi,

Calculating working days in DAX is a bit more difficult than in excel. I recommend cheking this article by SQLBI: https://www.sqlbi.com/articles/counting-working-days-in-dax/

They explain what to do well. In essence you want have an indicator column in your calendar table whether or not a day is working day. In addition to weekends you can have a calendar with public holidays, but this is a story on its own. 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors