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
Check out the Formula Handbook template!