The NETWORKDAYS function in DAX needs a single-column table of holiday dates not a filter, not a boolean, just the dates. If your Calendar table has [Date] and [IsHoliday], you want to grab only the holiday dates and pass those in. Here’s what works for me:
DailyAvg =
VAR TotalRevenue = CALCULATE(SUM(DealerTargets[Revenue]))
VAR NumDays =NETWORKDAYS( DATE(YEAR(TODAY()), MONTH(TODAY()), 1),TODAY(),
SELECTCOLUMNS(
FILTER('Calendar', 'Calendar'[IsHoliday] = 1),
"HolidayDate", 'Calendar'[Date]
))RETURN
IF(NumDays > 0,ROUND(TotalRevenue / NumDays, 2),0)
Why this works:
-
SELECTCOLUMNS(..., "HolidayDate", 'Calendar'[Date]) makes sure you’re passing exactly what NETWORKDAYS wants: just the date column for your holidays.
If your [IsHoliday] column uses something other than 1/0 (like TRUE/FALSE or Yes/No), just tweak the filter bit to match. If you have a separate Holidays table, it’s even easier just pass the [Date] column from that table as your holidays argument.