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! :smiley: 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:

38%20PM

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:

46%20PM

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.

2 Likes

Thank you Justin! That worked perfectly. I had to spend a little time figuring out how to properly reference columns (I was using quotes instead of curly brackets), but after that everything you said worked great! I appreciate your help!