Forum Discussion

ThomasSan's avatar
ThomasSan
Icon for Helper IV rankHelper IV
3 years ago
Solved

How to count working days between two dates within the same table

Hi everyone,   I am attempting to create a measure per row which counts the working days between two days within the same table. To do that, I found the following guide: https://blog.enterprisedna...
  • johnt75's avatar
    3 years ago

    You're adding it as a measure, not a calculated column, therefore it doesn't have a row context and doesn't know which delivery date or order date to use. 

    If you use the same code as a calculated column it will work, but since that blog article was published there is now a NETWORKDAYS function in DAX, so you could just use that instead.

    Working days column = NETWORKDAYS(Deliveries[Order date], Deliveries[Delivery date])