# Counting "selections" from multiple fields in each row

**URL:** <https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452>\
**Category:** Formulas\
**Created:** [June 1, 2023, 11:49am UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452 "2023-06-01T11:49:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moontime](https://forum.seatable.com/letter_avatar_proxy/v4/letter/m/8491ac/32.png) [@Moontime](https://forum.seatable.com/u/Moontime)\
**Post date:** [June 1, 2023, 11:49am UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452/1 "2023-06-01T11:49:10Z")

</div>

Does anyone know if and how it is possible to count how many times a given “choice” has been chosen in multiple single select fields?

In my example, I am trying to create a security score based on a 1-4 scale ( on different Security areas, Eg. backup, restore, access control, and more. Let’s say I have 20 different areas of which each has a score between 1-4. Now I want to sum up the score, but I would like to do so without creating 20 new columns with if statements that convert the single select to numbers, which I could then aggregate. That would be time-consuming and hard to maintain as I add new ones,

Basically, I want to do something like "count if any single select field in row = “Inadequate” " and then three similar ones for the other relevant choices in the single select.

 ![image](https://forum.seatable.io/uploads/default/original/2X/3/3f428fae65c1ae347f42a144fcdb124b940c944f.png)

![image](https://forum.seatable.io/uploads/default/original/2X/2/2b7c5b9b501957b8bbe892a1162b2558599e173d.png)

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [June 1, 2023, 12:40pm UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452/2 "2023-06-01T12:40:02Z")

</div>

You can use the switch() function.

This is my table:

 ![image](https://forum.seatable.io/uploads/default/original/2X/a/a0b13ec109794a205ab2d014279540593cab2edb.png)

This is the formula i used:

 ![image](https://forum.seatable.io/uploads/default/original/2X/c/c088f16064d7c0d38fd8f39237f3c352c84ccd36.png)

Simple enough, right? And pretty flexible too!

---

<div class="post-metadata">

**Author:** ![Moontime](https://forum.seatable.com/letter_avatar_proxy/v4/letter/m/8491ac/32.png) [@Moontime](https://forum.seatable.com/u/Moontime)\
**Post date:** [June 2, 2023, 6:27am UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452/3 "2023-06-02T06:27:02Z")

</div>

Fantastic! It is the perfect solution!

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [June 2, 2023, 7:15am UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452/4 "2023-06-02T07:15:26Z")

</div>

Wonderful. I was hoping you’d say that.

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [June 4, 2023, 7:15am UTC](https://forum.seatable.com/t/counting-selections-from-multiple-fields-in-each-row/2452/5 "2023-06-04T07:15:56Z")

</div>

Closed on June 4, 2023, 7:15am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
