# Aggregate count of checkboxes

Hello everyone,

I am an Airtable newbie, so I apologize if this has been asked before, should be obvious, etc. I am currently working on a table where we have 6 checkbox fields for each field record. If I have 10 records, there are a potential of 60 checkboxes that can be checked. I am trying to find a way to summarize how many of the 60 checkboxes have been checked (ideally by percentage, but number would work too). Does anyone have a suggestion on how I might be able to do this?

Thanks and I hope everyone has a great day!

-M

Welcome to the community, Matthew! One thing to keep in mind is that Airtableâ€™s formulas, which youâ€™ll use to check each checkbox state, operate only with whatâ€™s in the same record. So in your case, where you have six checkbox fields in a given record, the formula you write will only tally the state of those six. Unlike with a spreadsheet, Airtable formulas canâ€™t â€śseeâ€ť field values in other records. To create an aggregate summary across all ten records will require linking to another table.

Hereâ€™s an example. Iâ€™ve got ten records with six checkboxes each, with the fields named `{Ck1}` through `{Ck6}`.

The last field is a formula that concatenates the string equivalents of all the checkboxes (a check returns â€śTRUEâ€ť, while no check returns nothing), uses SUBSTITUTE to turn each â€śTRUEâ€ť into â€śTâ€ť, then counts the string length.

``````LEN(SUBSTITUTE(Ck1 & Ck2 & Ck3 & Ck4 & Ck5 & Ck6, "TRUE", "T"))
``````

Iâ€™ll add a link field at the end, with all records pointing to the same record in another table:

In that summary record, Iâ€™ll roll up the sum of all values in the `{Checked}` field from my main table:

Next Iâ€™ll add a Count field type to count the linked records, then use that in a formula to determine the final percentage:

If I add more records to the main table, that summary percentage will update appropriately as long as the link to the summary record exists. This can be automatically created by grouping the main table by that link field, so that all new records get auto-linked.

1 Like