# Workaround Countif in a row

**URL:** https://community.glideapps.com/t/workaround-countif-in-a-row/27802
**Category:** Community Resources
**Created:** [June 8, 2021, 8:15pm UTC](https://community.glideapps.com/t/workaround-countif-in-a-row/27802 "2021-06-08T20:15:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Alexis\_AZOULAI](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexis_azoulai/32/20550_2.png) [@Alexis\_AZOULAI](https://community.glideapps.com/u/Alexis_AZOULAI)
#### Post date: [June 8, 2021, 8:15pm UTC](https://community.glideapps.com/t/workaround-countif-in-a-row/27802/1 "2021-06-08T20:15:09Z")

</div>

Hi everybody,

I wanted to share with you this solution to count the number of cells in a row that match given values ​​contained in a “choice” component.

Here is an example : [https://mushy-hands-5054.glideapp.io/](https://mushy-hands-5054.glideapp.io/)

It is very simple. The “choice” component returns 1 for the first choice and 0.00001 for the second.  
A “Math” column is the sum. A new “Math” column with the TRUNC function determines the number of first choices and another with the MOD function indicates the number of second choices.  
We can still add other choices by returning higher numbers in the column (100000000) and dividing the sum by this number before doing the TRUNC function.  
If anyone needs it 😉 😉 😉

---

<div class="post-metadata">

### Author: ![Arshad\_Qureshi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arshad_qureshi/32/44146_2.png) [@Arshad\_Qureshi](https://community.glideapps.com/u/Arshad_Qureshi)
#### Post date: [June 25, 2022, 9:37pm UTC](https://community.glideapps.com/t/workaround-countif-in-a-row/27802/2 "2022-06-25T21:37:21Z")

</div>

Do you have clear example of it

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [June 26, 2022, 12:27am UTC](https://community.glideapps.com/t/workaround-countif-in-a-row/27802/3 "2022-06-26T00:27:26Z")

</div>

Looks like the app is copyable, so you can just copy it and take a look at how it’s set up.
