Forum Discussion

roehler's avatar
roehler
Icon for Helper I rankHelper I
1 year ago
Solved

NETWORKDAYS using Date VAR

I'm trying to generate a "WorkingDays" column that calculates the NETWORKDAYS using the StartDate/EndDate values I've created in my Quarter's table.  I'm not getting an error, but it's still not work...
  • OwenAuger's avatar
    1 year ago

    Hi roehler 

    You don't need SELECTEDVALUE.

    The calculated column expression is evaluated in the row context of the Quarters table, so you can reference columns of that table directly.

    WorkingDays =
    VAR StartDate = Quarters[StartDate]
    VAR EndDate = Quarters[EndDate]
    RETURN
        NETWORKDAYS ( StartDate, EndDate, 1, Holidays )