Count Children Criteria Out of Totals
Smartsheet Community:
I am Trying Create a Formula That Will Count The Total Number of Children That Pass Out of the Entire Population Set. For Example:
10 Out of 300 Test Cases Passed
My Formula:
=COUNTIF(CHILDREN()), "Pass" + " Passed Out Of " + (COUNT(CHILDREN(), " ") + " Pass")
Thanks
Best Answer
-
I believe @Michael Culley is suggesting
=VALUE(COUNTIF(CHILDREN([Test Status]@row), "Pass")) + " Passed Out Of " + VALUE(COUNTIFS(CHILDREN([Test Status]@row), OR(@cell = "", @cell <> "")))
The formula uses the VALUE function because you are mixing text and numbers together. Smartsheet doesn't know whether to treat the COUNTIFS function as text or number. Without the VALUE function the formula would throw an error (try it). The VALUE forces the function to behave as a number.
Kelly
Answers
-
You need to select a cell inside of your children parenthesis. So basically Children(parentrow@row) something to that effect.
-
I am Not Sure I Follow. I am Counting All the Children as a Total but want to Count the Number of Pass. i.e. 4 Out 300 Passed.
Are you Saying Something Like This? If So, it is UNPARSEABLE:
=COUNTIF(CHILDREN([Test Status]@row)), "Pass" + " Passed Out Of " + (COUNT(CHILDREN([Test Status]@row), " ") + " Pass")
-
I believe @Michael Culley is suggesting
=VALUE(COUNTIF(CHILDREN([Test Status]@row), "Pass")) + " Passed Out Of " + VALUE(COUNTIFS(CHILDREN([Test Status]@row), OR(@cell = "", @cell <> "")))
The formula uses the VALUE function because you are mixing text and numbers together. Smartsheet doesn't know whether to treat the COUNTIFS function as text or number. Without the VALUE function the formula would throw an error (try it). The VALUE forces the function to behave as a number.
Kelly
-
Than Worked, Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 141 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!