Complex Issue in Power BI using =NetworkDays()

Iceshade

Board Regular
Joined
May 22, 2017
Messages
104
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I am novice in Power BI but loving the learning journey. I have come across a problem I am not sure how to approach.

Problem
I have 4 start dates and 4 end dates (see below table)::

Start Date ColumnEnd Date Column
Team 1 StartTeam 1 End
Team 2 StartTeam 2 End
Team 3 StartTeam 3 End
Team 4 StartTeam 4 End

I want a new column that will do the following (using =Networkdays):

  • Find which column has Start Date (e.g. [Team 2 Start] contains the date)
  • THEN
  • See if the corresponding End Date is also captured ([Team 2 End])
  • If End Date exists - calculate # of Network days between the 2 dates
  • ELSE
  • Use Today() as the End Date
  • Calculate # of network days between the 2 dates (with 2nd date being Today())

I have been able to work out how to do this between 2 specified date columns but unsure how to get it find which column contains a start date and then it's corresponding end date column.
This is what I am using to achieve that:
Power Query:
=NETWORKDAYS([Team 1 Start Date],IF([Team 1 End Date]= BLANK(),TODAY(),[Team 1 End Date]))

Apologies if I haven't been clear. Would really appreciate the guidance.

Thank you.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,339
Messages
6,171,533
Members
452,409
Latest member
brychu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top