Working Days measure without helper column?

macfuller

Active Member
Joined
Apr 30, 2014
Messages
319
Office Version
  1. 365
Platform
  1. Windows
I have a calendar table with a column WorkingDay that has a 1 for working days and 0 for weekends and holidays. A typical helper column to get business days would be:

Code:
Business Days from Approval to Dispatch=    
CALCULATE (
        SUMX (
            Calendar,
            Calendar[WorkingDay]
        ),
        ALL ( Calendar ),
        DATESBETWEEN (
            Calendar[Date],
            RELATED (Requisitions[Approval Date]),
            Orders[Dispatch Date]
        )
    ) - 1
And I can then take the AVERAGE( Orders[Business Days from Approval to Dispatch]) of that column in a measure.

I have a *lot* of dates where I'd like to get the number of business days between events in different tables. Instead of having a helper column and a measure for each duration I'd like to just have a single measure for each duration, but I'm tying myself in knots trying to figure out how to correctly relate the dates in the tables without the helper column.

In this example Requisitions is 1:many on Orders related by fields PrimaryKey and ForeignKey respectively. The Calendar table is also 1:many on the Order table.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Macfuller,
And what about using the Excel formula =NETWORKDAYS.INTL(A2,B2,myweekendsetting,myholidayslist)
Cheers
Sergio
 
Upvote 0
The lack of such a function in DAX is an ongoing source of frustration for all of us!
 
Upvote 0

Forum statistics

Threads
1,214,825
Messages
6,121,788
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top