Count the number of projects done for a client without sub projects
I'm trying to count the number of projects completed for a client. I've changed the client name to Apples for confidentiality purposes. I want to count the number of projects done for Apples, without including the indented rows. Screenshot below:
I have tried the following formula: =COUNTIF(DESCENDANTS(Client:Client), "Apples"), however, the result comes back as 7 rather than 5. Any solutions?
Answers
-
I think you want to use CHILDREN rather than DESCENDANTS.
Is there a value of 2 next to the one Apples that is furthest indented?
-
Hi John,
Tried that, gave a result of 6.
-
Are you able to provide a wider screenshot that shows the values for each row?
-
Hi John,
Sure,
-
Ok, I see what is being done now. You are referencing the entire Client Column, since there is no real hierarchy when you reference an entire column, it will treat them all as Descendants or Children.
That being said, if you are trying to get your formula to work in the Project/Prop...Code column, try this where it currently has the "1" in the dark blue bar.
=COUNT(Children())
-
Hi John,
Thanks! This worked! Such an obvious solution!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!