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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have the below measure that works out the week days between 2 days, but sometimes the 2nd date (position filled date), wont have a value, so how can I modify the below measure so that if the 2nd data parameter of "NETWORKDAYS" is blank, it uses todays date?
Can anyone help with this?
I ended up using "
@StuartSmith Try:
Weekdays =
VAR __StartDate = 'KPI Measures: Time to Fill'[(1) Position End Date]
VAR __End = 'KPI Measures: Time to Fill'[(2) Position Filled Date]
VAR __EndDate = IF( __End = BLANK(), TODAY(), __End)
VAR __Result = NETWORKDAYS( __StartDate, __EndDate) +0
RETURN
__Result
Thanks, and your code makes perfect sense. I must learn to breakdown the solution into smaller chunks. That said, by adding the line that checks if the "Positon Filled" value is Blank, its doing something odd and creating lots more rows. I have been able to replicate with dummy data and you can view a .pbix file below.
Time to Fill Position Filled Checker The file contains 2 tables visuals, 1 without th line to check if blank and 1 with.
Thanks in advance,