Giving a Parent Row a level score
Hi
Is it possible to give a parent row a score based on its hierarchy in the row grouping? ie The top level of grouping being level 1, next level of grouping level 2, but only where the row is a parent?
I am currently using =COUNT(ANCESTORS()) but this gives a task a score even if it doesnt have a child.
It would be great to return a level like in the image below.
I have seen it done before but its been a while and cant remember. If anyone could help, it would be appreciated.
Thanks.
Best Answer
-
Hi @RobS,
This formula should do what you're after:
=IF(COUNT(CHILDREN([Task Name]@row)) > 0, COUNT(ANCESTORS()) + 1)
Using your example data:
Hope this helps, but any problems/queries then just post! 🙂
Answers
-
Hi @RobS,
You could use an IF statement where you use "COUNT(CHILDREN) > 0" as the logical expression to see if it has children and where the answer is true use your logic, where false you can use "" to leave the row empty.
Hope this helps!
John
-
Hi @RobS,
This formula should do what you're after:
=IF(COUNT(CHILDREN([Task Name]@row)) > 0, COUNT(ANCESTORS()) + 1)
Using your example data:
Hope this helps, but any problems/queries then just post! 🙂
-
Perfect, thank you Nick.
Help Article Resources
Categories
Check out the Formula Handbook template!