# Rollup Field is Blank Even Though Count is 0

**URL:** <https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768>\
**Category:** Ask for Help\
**Created:** [May 31, 2024, 6:46pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768 "2024-05-31T18:46:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [May 31, 2024, 6:46pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/1 "2024-05-31T18:46:06Z")

</div>

My Deal table has a rollup field that shows the count of the IDs of related Position records.

 ![rollup](https://europe1.discourse-cdn.com/flex005/uploads/noloco/original/1X/93fd5cf2be70030710e6d0697ce881e1ea056e73.jpeg)

But when there are no related Position records for a certain Deal, the rollup field sometimes shows 0 and sometimes remains blank.

 ![blank](https://europe1.discourse-cdn.com/flex005/uploads/noloco/original/1X/04f7a2c17a530747e161465131ee853f001e73f8.png)

I need to be able to filter based on the Position count, but when the value is blank the filter always evaluates to false.

For example, a Deal should pass the filter if its Positions count is less than 7, but since it’s blank (instead of 0) I believe the Deal is getting filtered out.

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 3, 2024, 4:03pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/2 "2024-06-03T16:03:56Z")

</div>

Did the team get a chance to look at this yet?

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 4, 2024, 4:25pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/3 "2024-06-04T16:25:54Z")

</div>

Hi, please take a look at this when you can. Thank you.

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 5, 2024, 3:10pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/4 "2024-06-05T15:10:21Z")

</div>

Anyone know of a workaround? I’ll share my use case:

My users submit their Deals to Funders via email. But each funder has its own required criteria. One such criteria is the Deal’s number of “positions” or existing loans.

So if a Deal has 0 positions, then all Funders whose minimum number of positions is 0 should be appearing in the “Matched Funders” table.

![Screenshot 2024-06-05 at 10.06.20 AM](https://europe1.discourse-cdn.com/flex005/uploads/noloco/original/1X/5ba773a6a5a3ffb9044254fcad8c853f826d3fca.png)

But it seems that a Deal with 0 positions will often have a blank value in its “num pos” field, which is the rollup count of that Deal’s related position records.

Since this blank value is not \>= 0, the filter evaluates to false even though it should be true.

I know this is the case because only after you add a related position to that Deal and then remove it, the matched Funders show up.

Is this how the count rollup is supposed to work? To not return 0 by default when there are 0 related records?

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 5, 2024, 3:45pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/5 "2024-06-05T15:45:41Z")

</div>

Good question @fundmore … we’ll have to think about how we handle this one a bit carefully.

The same issue would apply to any number field where you haven’t yet set a number.

In the meantime you could do “\>= 0 OR IS EMPTY”

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 5, 2024, 8:53pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/6 "2024-06-05T20:53:01Z")

</div>

That’s a good idea, but it only lets me filter based on the Funder fields.

The “Select a field” dropdown does not have the same kind of data picker that the “Some value” has.

So I can’t filter for Deal’s “num pos” field is empty.

 ![data_picker](https://europe1.discourse-cdn.com/flex005/uploads/noloco/original/1X/8c3f9c309f3872ac7001a22549cc5726e2789359.png)

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 6, 2024, 6:40am UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/7 "2024-06-06T06:40:23Z")

</div>

I see what you’re saying, so it’s a nested value?

Could you add a lookup or rollup on that value to lift it it up to Deal table?

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 11, 2024, 4:42pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/8 "2024-06-11T16:42:51Z")

</div>

No, because there is no relation between the Deal and that Funder row.

“Matched funders” are just the Funders that pass a series of filter tests, given that Deal’s criteria.

The issue is when the Deal’s rollup field is blank instead of 0, that one filter breaks the whole system.

Is there a way to auto-refresh this rollup field daily through the GraphQL layer?

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 11, 2024, 4:51pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/9 "2024-06-11T16:51:20Z")

</div>

We’re going to chat about this internally and see what we can do

It’s not so much that the value isn’t synced, it’s just that, at the moment, the lack of a connection leads it to not ever calculate, and thus stay `null` instead of `0`

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 14, 2024, 1:26pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/10 "2024-06-14T13:26:11Z")

</div>

Ok, great to hear. Please keep me updated here if there’s a solution.

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 20, 2024, 7:08pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/11 "2024-06-20T19:08:26Z")

</div>

Hi, was there anything the team can do?

If not, I think I will build a workaround that auto-creates and deletes a Position record every time a Deal is created.

---

<div class="post-metadata">

**Author:** ![darragh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.noloco.io/darragh/32/12_2.png) [@darragh](https://community.noloco.io/u/darragh)\
**Post date:** [June 21, 2024, 5:53am UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/12 "2024-06-21T05:53:46Z")

</div>

Not at the moment @fundmore - it’s something we hope to tackle soon, but it’s a bit of an edge case at the moment.

That workaround seems reasonable though

---

<div class="post-metadata">

**Author:** ![fundmore](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@fundmore](https://community.noloco.io/u/fundmore)\
**Post date:** [June 21, 2024, 12:52pm UTC](https://community.noloco.io/t/rollup-field-is-blank-even-though-count-is-0/768/13 "2024-06-21T12:52:37Z")

</div>

Alright. I did it quite easily through Workflows.
