# Count only true column. How?

**URL:** <https://community.glideapps.com/t/count-only-true-column-how/70006>\
**Category:** Ask for Help\
**Created:** [January 25, 2024, 11:42am UTC](https://community.glideapps.com/t/count-only-true-column-how/70006 "2024-01-25T11:42:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcos.Souza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcos.souza/32/69057_2.png) [@Marcos.Souza](https://community.glideapps.com/u/Marcos.Souza)\
**Post date:** [January 25, 2024, 11:42am UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/1 "2024-01-25T11:42:37Z")

</div>

Hello community! I have a question about how to deal with a situation. To illustrate, imagine that you have a list of items and there are several columns in which you mark true or false in each of them. And in a given column you add up how many columns are marked true. how to do this?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 25, 2024, 11:44am UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/2 "2024-01-25T11:44:56Z")

</div>

Use a rollup column, it has an option to count true values.

Oh wait, I didn’t read properly. Sorry.  
Do it like this:

- use a make array column to create an array from all of your Boolean columns
- then use a rollup that targets the array column

---

<div class="post-metadata">

**Author:** ![Marcos.Souza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcos.souza/32/69057_2.png) [@Marcos.Souza](https://community.glideapps.com/u/Marcos.Souza)\
**Post date:** [January 25, 2024, 12:39pm UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/3 "2024-01-25T12:39:30Z")

</div>

yes, it was the first thing I tried to do, but the rollup function counts any element, and in the case of a cell with a Boolean value, false is also considered a value, that is, this function counts how many elements an array has, whether true or false. If there was a conditional way to count it would be great.

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [January 25, 2024, 12:42pm UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/4 "2024-01-25T12:42:28Z")

</div>

Sorry for interrupting. Coincidentally, I have a similar case where I use the “math” column. It works for my case.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [January 25, 2024, 12:44pm UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/5 "2024-01-25T12:44:00Z")

</div>

Perhaps you missed my edit?

If you do it as I described, it works. Please observe:

 ![CleanShot 2024-01-25 at 20.42.55@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/d/2d95cebc2496f540c5bbc7dc93ef28e6eaa1b5da.png)

---

<div class="post-metadata">

**Author:** ![Marcos.Souza](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/marcos.souza/32/69057_2.png) [@Marcos.Souza](https://community.glideapps.com/u/Marcos.Souza)\
**Post date:** [January 25, 2024, 3:17pm UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/6 "2024-01-25T15:17:51Z")

</div>

For some reason the option to count only true ones in Rollup was not available, I removed the columns and added them again and now it is working as you suggested. Thank you for that!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [February 1, 2024, 3:18pm UTC](https://community.glideapps.com/t/count-only-true-column-how/70006/7 "2024-02-01T15:18:20Z")

</div>

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