Adding NETWORKDAYS to a formula gives #INVALID DATA TYPE
Hi,
Happy Friday!!
Please see below - I know I'm missing something simple. Any thoughts?
I have a little formula that allows me to have a col formula and also have SUM(CHILDREN()).
Date cols are both dates.
Target total duration col is text / number.
When I don't use NETWORKDAYS, I get the total duration as expected, please see the formula and snip below.
=IF([HC-Calc]@row = 1, "", IF(COUNT(CHILDREN()) = 0, [Target End Date]@row - [Target Start Date]@row, SUM(CHILDREN())))
When I update the formula to include NETWORKDAYS, to give the work day duration, and update the start / end date in the formula, I get our old friend #INVALID DATA TYPE. Please see the formula and snip below.
=IF([HC-Calc]@row = 1, "", IF(COUNT(CHILDREN()) = 0, NETWORKDAYS([Target Start Date]@row, [Target End Date]@row, SUM(CHILDREN()))))
Thanks for any help.
Answers
-
Double and triple check your two date columns are in fact set as date type columns. If they definitely are, how exactly are they being populated?
-
Hi,
After finding this post (Thanks @Kelly Moore @Xavier Gomez )
I think I have fixed it with
=IF([HC-Calc]@row = 1, "", IF(COUNT(CHILDREN()) > 0, SUM(CHILDREN()), IF(AND(ISDATE([Target Start Date]@row), ISDATE([Target End Date]@row)), NETWORKDAYS([Target Start Date]@row, [Target End Date]@row))))
-
@Paul Newcome Hi, they are date cols, and they will be keyed in by the planners.
The revised formula looks like it works.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 466 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!