Formula COUNTIF(Children) with multiple conditions
In Smartsheet, there is a function called Countif(CHILDREN([reference])). This is a great formula but what if I wanted the count of children based on more than 1 condition?
I searched in the knowledge base, but couldn't find either a 'countifs(children)' formula nor a workaround.
Is there a workaround?
Example
In this example, today's date is 15/01/2020
If you apply the formula CountIf(Children([Complete %])), the number of children would equal 6.
What I would like to count are the children which are not 100% completed before today's date.
So a countif based on 2 conditions. In this case I should have a count of 1 child.
Best regards
Stéphane
Best Answer
-
Hi @Stephane
You can do this with a COUNTIFS (plural), to add in multiple criteria. Try this:
=COUNTIFS(CHILDREN([End Date]@row), <TODAY(), CHILDREN([Complete %]@row), <>1)
This will look for all the children that have an end-date that is in the past, and all the children that are not 100% complete. You will want to put this in a new column on each Parent row to calculate the count of the rows below it.
If you wanted a total of all of the children, under different parents, you could them SUM that whole column with the COUNTIFS formulas.
Here are the Help Center articles I used:
Let me know if this works for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Answers
-
Hi @Stephane
You can do this with a COUNTIFS (plural), to add in multiple criteria. Try this:
=COUNTIFS(CHILDREN([End Date]@row), <TODAY(), CHILDREN([Complete %]@row), <>1)
This will look for all the children that have an end-date that is in the past, and all the children that are not 100% complete. You will want to put this in a new column on each Parent row to calculate the count of the rows below it.
If you wanted a total of all of the children, under different parents, you could them SUM that whole column with the COUNTIFS formulas.
Here are the Help Center articles I used:
Let me know if this works for you!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now -
Hi Genevieve,
Thank you for this great insight. It is very helpfull in solving my query.
Kr
Stéphane
-
Great! Glad I could help.
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
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!