COUNTIF Parent but not Children
I added active to my child rows to get the children to appear on a report so now I need to change my formula to exclude children from a count because of over-counting. I have seen articles about helper columns and added a checkbox helper but I haven't had any success. Some answers have shown an IF statement, but where do I type that statement?
Best Answer
-
I use a helper column that tells you if a row is a parent or child. Using this formula,
=COUNT(ANCESTORS([Column Name]@row)) ,
the helper column would have a value of 0 for SRS (parent) while Read Only, Planning, etc. (child rows) would have 1. Of course, you would then change to COUNTIFS to account for the additional variable.
Will this work?
Answers
-
I use a helper column that tells you if a row is a parent or child. Using this formula,
=COUNT(ANCESTORS([Column Name]@row)) ,
the helper column would have a value of 0 for SRS (parent) while Read Only, Planning, etc. (child rows) would have 1. Of course, you would then change to COUNTIFS to account for the additional variable.
Will this work?
-
That worked. Thanks for the help.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!