Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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 working:
I've tried using SELECTEDVALUE(Quarters[StartDate].[Date] and SELECTEDVALUE(Quarters[EndDate].[Date], but I keep getting NULL in WorkingDays. Any ideas?
Solved! Go to Solution.
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 )
Thank you Owen, that was perfect. I had added SELECTEDVALUE after my first attempt, and without it, it didn't work for some reason, but I removed it this morning and it worked fine.
Hi @roehler ,
Its likely due to the misuse of the SELECTEDVALUE function within a calculated column context. SELECTEDVALUE is best suited for measures or visuals where there's a specific filter context.
In a calculated column, each row already has direct access to its respective values, so there's no need to use SELECTEDVALUE. Instead, you can refer directly to the [StartDate] and [EndDate] columns.
Additionally, make sure that the Holidays table you're referencing is structured as a single-column table with proper date formatting. The corrected DAX should look like this:
WorkingDays =
NETWORKDAYS(Quarters[StartDate], Quarters[EndDate], 1, Holidays[Date])
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 )
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 18 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 36 | |
| 25 | |
| 24 |