Dax Calculation for Number of Days excluding weekends and holidays

Hi @bimbbb,

Please see if it serves your requirements.

Total Workdays Not Holidays_V2.0 =

SUMX (
    FILTER (
        ALL ( 'Dates' ),
        'Dates'[Date] >= MAX ( 'Main_table'[Start Date] )
            && 'Dates'[Date] <= MAX ( 'Main_table'[Last_day_calc] )
            && 'Dates'[Date] <= MAX ( 'Dates'[Date] )
    ),
    'Dates'[Workday Not Holiday]
)

Total Workdays_V2.0 = 

SUMX (
    FILTER (
        ALL ( 'Dates' ),
        'Dates'[Date] >= MAX ( 'Main_table'[Start Date] )
            && 'Dates'[Date] <= MAX ( 'Main_table'[Last_day_calc] )
            && 'Dates'[Date] <= MAX ( 'Dates'[Date] )
    ),
    'Dates'[WorkDay]
)

In case, if you select particular month, it will count only that Month from start. Otherwise, it will count all dates.

eDNA_Total working days not incl holidays solution.pbix (201.9 KB)

Hopefully, it will resolve your issue :slight_smile:

1 Like