How to use NetworkDays Dax Function in Power BI

In this blog, I’ll describe How to use “NetworkDays” Dax Function in Power BI

In Power BI’s DAX language, you can use the NETWORKDAYS function to calculate the number of working days between two dates, excluding weekends and optionally specified holidays.

Syntax: – NETWORKDAYS(<start_date>, <end_date>[, <weekend>, <holidays>])

A screenshot of a computer

Description automatically generated

Step 1:-
Pick the visual “Table” Drag the OrderID, OrderDate, ShippedDate, and HolidayList from the field section to the value field.

A screenshot of a computer

Description automatically generated

Step 2:- Calculate the working weekdays with the help of Networkdays function.


No. of working days =
 

Var start_date= SELECTEDVALUE(Orders[OrderDate])

Var end_date= SELECTEDVALUE(Orders[ShippedDate])

returnNETWORKDAYS(start_date,end_date,1,holiday)

Note: I’ve loaded the Holiday list Table on the Power BI desktop since the holiday parameter requires a column table.



Step 3:-
Drag the measure in the Table Visual.

This would return the number of business days, excluding weekends and specified holidays, that passed between the order date and the shipped date.

Addend Analytics is a Microsoft Gold Partner based in Mumbai, India, and a branch office in the U.S.

Addend has successfully implemented 100+ Microsoft Power BI and Business Central projects for 100+ clients across sectors like Financial Services, Banking, Insurance, Retail, Sales, Manufacturing, Real estate, Logistics, and Healthcare in countries like the US, Europe, Switzerland, and Australia.

Get a free consultation now by emailing us or contacting us.