Forum Discussion

Shankar's avatar
Shankar
Regular Visitor
9 years ago
Solved

equivalent function of Networkdays in DAX

Hi Team - I need to calculate the total number of business days between two dates. Attached the file and the results. Please help.
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi Shankar,

     

    You can try to use below calculate column formula to calculate the total normal workday.(except saturday sunday)

    Total WorkDays =
    COUNTROWS (
        FILTER (
            ADDCOLUMNS ( CALENDAR ( [Start], [End] ), "Day of Week", WEEKDAY ( [Date], 1 ) ),
            [Day of Week] <> 1
                && [Day of Week] <> 7
        )
    )

     

    If you need to remove other holidays, you need to create a holiday table and remove them in the formula.

     

    Regards,

    Xiaoxin Sheng