# 0️⃣ The Magic 0-0 that forces empty cells to be ZEROES

**URL:** <https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473>\
**Category:** Community Resources\
**Tags:** tutorial\
**Created:** [April 6, 2022, 1:32pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473 "2022-04-06T13:32:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 6, 2022, 1:32pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/1 "2022-04-06T13:32:06Z")

</div>

## TL:DR

In any math column, use `0 - 0 + ...` to force empty values to be zeros! Huge thanks to @ThinhDinh for leading me to this solution!

https://www.loom.com/embed/36040ffaa1b24b81bcaa9612c369068b

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 6, 2022, 2:03pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/2 "2022-04-06T14:03:41Z")

</div>

Honestly I still don’t know how this works 🤣

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 6, 2022, 2:07pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/3 "2022-04-06T14:07:06Z")

</div>

Funny!

By chance I had the same problem on Monday but I fixed it in this way:

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

Feliz día!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 6, 2022, 2:29pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/4 "2022-04-06T14:29:35Z")

</div>

So…any sort of `0` math seems to work!

- `0 - 0 + ...`
- `-0 + 0 + ...`
- `0 / 1 + ...`
- `0 * 0 + ...`
- `0 ^ 1 + ...`
- `log(1) + ...`

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 6, 2022, 2:47pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/5 "2022-04-06T14:47:26Z")

</div>

> [@Robert\_Petitto](#):
>
> - `0 - 0 + ...`
> - `-0 + 0 + ...`

Right but the Sum cases don’t work if they are at the end of operation. I mean:

if X=empty:

```auto
a) 0-0 +X => 0 
b) X+ 0-0 => empty

```

The others work perfectly no matter where you put them.

Saludos!

---

<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 6, 2022, 8:40pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/6 "2022-04-06T20:40:56Z")

</div>

This is … eerie?! Is Mark aware of this? It’s like there is a ghost in his code.

---

<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 6, 2022, 10:04pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/7 "2022-04-06T22:04:43Z")

</div>

I’m not sure at all, but it could be that the ‘0’ symbol represents both “zero” and the “empty set” in the language that’s used in Glide’s backend (Typescript?).

If there is the case, then inserting any math operation whose output is 0 and then adding the empty cell will return the number “0” instead of simply returning the empty set “0” without the math. So 2-2+… would also work I think.

What I don’t understand is why 0+0 or 0-0 at the end of the math would be considered the empty set, but not at the beginning. Coders would probably now. Maybe it’s just the grammar of the language?

---

<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 6, 2022, 10:14pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/8 "2022-04-06T22:14:22Z")

</div>

This pink text on grey background is somewhat hard to read. Is this new? Could someone adjust this?

@SantiagoPerez @George-Glide

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 6, 2022, 11:00pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/9 "2022-04-06T23:00:37Z")

</div>

Uh…pink text on grey background?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/c/0c7ebf82dd1d925087b90b6a28e92fd97e63b027.jpeg)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/f/af1be64154313c6219358ba62baa362681eb1d0e.gif)

---

<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 6, 2022, 11:05pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/10 "2022-04-06T23:05:28Z")

</div>

I see this. No biggy, it’s just hard to read.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/a/1a8edef4d98c4c9a3e0022a8c1772d9a61c9457b.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [April 7, 2022, 12:06am UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/11 "2022-04-07T00:06:54Z")

</div>

Agree that it’s not good. Fine on dark mode though.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/627f31ce875e58478fa6aae00a4c87e34cc64ef3.png)

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [April 7, 2022, 2:18pm UTC](https://community.glideapps.com/t/0-the-magic-0-0-that-forces-empty-cells-to-be-zeroes/40473/12 "2022-04-07T14:18:17Z")

</div>

Oh weird. I see that too…on my phone it looks different.
