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?
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
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
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!