Forum Discussion
roehler
Helper I
1 year agoNETWORKDAYS 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...
- 1 year ago
Hi roehler
You don't need
SELECTEDVALUE.The calculated column expression is evaluated in the row context of the
Quarterstable, so you can reference columns of that table directly.WorkingDays = VAR StartDate = Quarters[StartDate] VAR EndDate = Quarters[EndDate] RETURN NETWORKDAYS ( StartDate, EndDate, 1, Holidays )
OwenAuger
Super User
1 year agoHi 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 )