# COUNTIF on FLAGS at PARENTS level not returning any value (number)

Options

Hi Smart Community,

I am trying to Sum my CHILDREN() Countif but it is not giving any value. All my sub-children is indicated as flag (1 or 0)

Example

When there is a delay release in a category Bug Fix : it will flagged out RED. On Bug Fix, I did

=COUNTIF(CHILDREN()),1)+""

This seems to work fine and return with 2 (which is the total number of flagged items in Bug Fix). See below screenshot.

Obviously, I have 5 different categories and on a Parent level for all these categories, I would like to sum all categories flag but it doest return a value.

On the darker green : it should be counting (2+3+0+0+1) = 6 but I am not sure what formula i should be using? I have tried the following

=SUM(CHILDREN(),1) - return result as Red Flag

=COUNTIF(CHILDREN(),1)+"" - return result as 0

=SUM(CHILDREN()) - return result as White Flag

=SUM(CHILDREN(),1)+"" - return result as 1

Thank you in advance, and hope you are all having a great day so far :)

Syed

Tags:

• ✭✭✭✭✭✭
Options

The reason the SUM function does not work is because when you add + "" to the end of a formula, the numbers are converted to a text value. Try counting the DESCENDANTS...

=COUNTIFS(DESCENDANTS(), 1) + ""

• ✭✭✭✭✭✭
Options

The reason the SUM function does not work is because when you add + "" to the end of a formula, the numbers are converted to a text value. Try counting the DESCENDANTS...

=COUNTIFS(DESCENDANTS(), 1) + ""

• Options

Thank you Paul! This works like a champ. The descendants function is pretty new to me so this is great to know!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!