PorcuBI

Power BI Networkdays DAX​

CALCULATE WORKING DAYS USING DAX (NETWORKDAYS)​

In 2022, Microsoft introduced the DAX function NETWORKDAYS.

Using NETWORKDAYS you can easily calculate working days excluding the weekend. The really great thing about this is, that you can select the days that are counted as weekends (and therefore excluded), this gives you a lot of freedom.

Also, you can add additional days off (like holidays).

Networkdays DAX Power BI
Example NETWORKDAYS DAX function

How to use the NETWORKDAYS DAX function?

				
					Weekend On Sat/Sun=
        NETWORKDAYS (
               DATE( Begin Date ),
               DATE ( End Date ),
               1, //indicating the weekend
               { DATE ( holiday ) } ) //optional for holidays
                )
				
			

Try conditional formatting for data labels yourself!

The 1 in the DAX above indicates that the weekend is Saturday and Sunday. If your weekend is on another day, pick one of the other options.

For example, if you have a weekend on Tuesday and Wednesday, you would pick 4 to indicate the weekend.

You can also hardcode the beginning and end date for the calculation (like in the first picture), but you can also pick a flexible start and end date from your data.

An example of how you could use this is by calculating an employee’s working days in a specific year or how many working days are possible in a certain period.

Numbers to indicate the weekend

1 or omitted: Saturday, Sunday
2: Sunday, Monday
3: Monday, Tuesday
4: Tuesday, Wednesday
5: Wednesday, Thursday
6: Thursday, Friday
7: Friday, Saturday
11: Sunday only
12: Monday only
13: Tuesday only
14: Wednesday only
15: Thursday only
16: Friday only
17: Saturday only

Scroll to Top