Has Children Function

Hi,
I am trying to create a formula that will output the average of the child rows IF and ONLY if a line has child rows. If a line doesn't have child rows, I would like it to output (for example) the number "0" if the status column, Status@row, is "To Do" and "100" if Status@row is "Complete". Please let me know if there is a way to make this formula. It will need to be a column formula as well.
Thank you!!
Answers
-
Try something like this: =IF(COUNT(CHILDREN()) > 0, AVG(CHILDREN()), IF(CONTAINS("To Do", Status@row), 0, IF(CONTAINS("Complete", Status@row), 100))) Note it will be blank if status is neither To Do or Complete and there are no children. Hope this helps!
-
Thank you @Adam Murphy ! For anyone who finds this on their search for information, I was able to change the formula after AVG children at the point marked *** below to alter it to fit my needs while still evaluating based on child rows being present or not. It will evaluate the average of the child rows if they are present, so you will likely need to alter the formula if the average of the child rows is not what you need.
AVG(CHILDREN()), *** IF(CONTAINS("To Do", Status@row), 0, β¦
Help Article Resources
Categories
Check out the Formula Handbook template!