# Average only parent rows

Options

I have 4 parent rows and each row has 3 child rows. I want to take an average of only parent row percentage.

• ✭✭✭✭✭✭
Options

You can identify the parent rows by counting the number of children. Any row with more than 0 children is a parent. If you add a helper column to the sheet you can use this formula to put a 1 against all the parent rows and a 0 against the children. You can then hide that column.

=IF(COUNT(CHILDREN()) > 0, 1, 0)

Then instead of the AVG function you can use AVERAGEIF to average only the rows that have a 1 in the parent column.

=AVERAGEIF(Parent:Parent, 1, [% col]:[% col])

• ✭✭✭✭✭✭
Options

You can identify the parent rows by counting the number of children. Any row with more than 0 children is a parent. If you add a helper column to the sheet you can use this formula to put a 1 against all the parent rows and a 0 against the children. You can then hide that column.

=IF(COUNT(CHILDREN()) > 0, 1, 0)

Then instead of the AVG function you can use AVERAGEIF to average only the rows that have a 1 in the parent column.

=AVERAGEIF(Parent:Parent, 1, [% col]:[% col])

• Options

That works. Thanks...

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!