# Ask about rollup

**URL:** https://community.glideapps.com/t/ask-about-rollup/70875
**Category:** Ask for Help
**Created:** [February 16, 2024, 7:00am UTC](https://community.glideapps.com/t/ask-about-rollup/70875 "2024-02-16T07:00:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Yoga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga/32/70778_2.png) [@Yoga](https://community.glideapps.com/u/Yoga)
#### Post date: [February 16, 2024, 7:00am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/1 "2024-02-16T07:00:33Z")

</div>

Hi everyone,

How can we count with a specified condition? I see in the rollup, there is only count without applying any condition there.

In my case, in a column, there are two kind of data written, which are “OK” and “Not OK”. How can I count the “Not OK” in that column?

In Excel, I would simply write this : =COUNTIF(A2:A1000,“Not OK”)

Thank you for your answer.

---

<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: [February 16, 2024, 7:08am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/2 "2024-02-16T07:08:06Z")

</div>

You can use a Query column and apply a filter, and then do a rollup through the query.

Alternatively, instead of using “OK” and “Not OK”, use a boolean column. Then you could do a direct rollup counting `true` values.

---

<div class="post-metadata">

### Author: ![Yoga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga/32/70778_2.png) [@Yoga](https://community.glideapps.com/u/Yoga)
#### Post date: [February 16, 2024, 8:33am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/3 "2024-02-16T08:33:59Z")

</div>

Hi @Darren_Murphy thanks for your answer.

I don’t understand this Query function. How can we show this Query in Layout Editor? For example, from all 5 registered farmers (counted by total row only), there are 4 that the data is not completed. I use Query and filter the condition, and I get this result :

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/b/eb20f9585bbd5ac550852b4411fcf28655fdf77a.png)

But how can I bring this result to interface / layout?

> Then you could do a direct rollup counting `true` values

This is conditional counting (count if true), I can’t do conditional counting in Glide Table.

---

<div class="post-metadata">

### Author: ![Yoga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga/32/70778_2.png) [@Yoga](https://community.glideapps.com/u/Yoga)
#### Post date: [February 16, 2024, 9:04am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/4 "2024-02-16T09:04:46Z")

</div>

> and then do a rollup through the query.

There’s no Query column in the Rollup option.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/8/987cc9275a77fbc24f622358ef3b1012d986b2c7.png)

I think I missed something but I am not sure.

@Darren_Murphy

---

<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: [February 16, 2024, 9:07am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/5 "2024-02-16T09:07:40Z")

</div>

![CleanShot 2024-02-16 at 17.06.44@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/e/fea85c70367c613ce72d978a57befd0cad13c11b.png)

---

<div class="post-metadata">

### Author: ![Yoga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga/32/70778_2.png) [@Yoga](https://community.glideapps.com/u/Yoga)
#### Post date: [February 16, 2024, 9:09am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/6 "2024-02-16T09:09:53Z")

</div>

I see.

Voila! This is cool…

Thanks a lot @Darren_Murphy !

---

<div class="post-metadata">

### Author: ![Yoga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga/32/70778_2.png) [@Yoga](https://community.glideapps.com/u/Yoga)
#### Post date: [February 16, 2024, 9:49am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/7 "2024-02-16T09:49:13Z")

</div>

Hi @Darren_Murphy sorry I want to ask again,

Why is the field shown here is like this?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/3/53712f7e061f7f7a7da819b201c5b965857eef66.png)

This “off farm” is not the thing I want to see here. I want to see “transaction\_id” on the queried column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/24d2fc4411fcdd9347162de5910fde1669dc7938.png)

Why is the third column shown in the query, not the first column?

---

<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: [February 16, 2024, 9:55am UTC](https://community.glideapps.com/t/ask-about-rollup/70875/8 "2024-02-16T09:55:25Z")

</div>

The value that you see in the query bubble doesn’t mean anything, other than telling you that the query matched something. It works like a multiple relation in that respect.

If you need a specific value, you should add a Single Value column that fetches the value via the query (in this case, the transaction\_id).
