# Couting only certain rows

**URL:** <https://community.glideapps.com/t/couting-only-certain-rows/72595>\
**Category:** Ask for Help\
**Created:** [April 15, 2024, 1:34pm UTC](https://community.glideapps.com/t/couting-only-certain-rows/72595 "2024-04-15T13:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Andersson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robin_andersson/32/5397_2.png) [@Robin\_Andersson](https://community.glideapps.com/u/Robin_Andersson)\
**Post date:** [April 15, 2024, 1:34pm UTC](https://community.glideapps.com/t/couting-only-certain-rows/72595/1 "2024-04-15T13:34:50Z")

</div>

Hi pros!

i wanna do something in the built in table:

I have a column where it can either be “n”, “h” or “y”.  
I wanna calculate the amount of “y”:s in it, but only the rows where another column have the cell values “energy”.

Anybody knows? The GPTS out there have no idea of what they’re talking about on this, which is very common when asking them about glide stuff.

Cheers

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 15, 2024, 1:47pm UTC](https://community.glideapps.com/t/couting-only-certain-rows/72595/2 "2024-04-15T13:47:05Z")

</div>

Welcome back 👋

In short: query column + rollup column.

* * *

Try using a Query column, filter for your conditions, this should return exactly the rows you want to count. Then use a rollup column configured to “count” on the Query you just created.

---

<div class="post-metadata">

**Author:** ![Robin\_Andersson](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robin_andersson/32/5397_2.png) [@Robin\_Andersson](https://community.glideapps.com/u/Robin_Andersson)\
**Post date:** [April 15, 2024, 2:16pm UTC](https://community.glideapps.com/t/couting-only-certain-rows/72595/3 "2024-04-15T14:16:36Z")

</div>

Thank you!

Thanks for the fast response, this seems promising, it’s time I learn about the Query!
