# Math or ITE column bug?

**URL:** https://community.glideapps.com/t/math-or-ite-column-bug/71516
**Category:** Ask for Help
**Created:** [March 8, 2024, 9:37am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516 "2024-03-08T09:37:20Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Bungchow\_IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bungchow_ideapps/32/49062_2.png) [@Bungchow\_IDEApps](https://community.glideapps.com/u/Bungchow_IDEApps)
#### Post date: [March 8, 2024, 9:37am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/1 "2024-03-08T09:37:20Z")

</div>

I’d like to control net weight by using math & ite columns. But, the results on ite colum are not working consistently. Is it because of bug or wrong calculation?

 ![Screenshot 2024-03-08 162758](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/5/45917556a073ff57696a1ffab120f870762feccd.png)

 ![Screenshot 2024-03-08 164223](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/1/d1391661a8debb1e8aef2fad748e98d1c5d2fef3.png)

---

<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: [March 8, 2024, 9:45am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/2 "2024-03-08T09:45:58Z")

</div>

You will probably find that the underlying values may not be exactly what is shown.  
Try adjusting the number of decimal places in each of those columns from 2 to 4, and any differences should be immediately apparent.

---

<div class="post-metadata">

### Author: ![Bungchow\_IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bungchow_ideapps/32/49062_2.png) [@Bungchow\_IDEApps](https://community.glideapps.com/u/Bungchow_IDEApps)
#### Post date: [March 8, 2024, 9:56am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/3 "2024-03-08T09:56:43Z")

</div>

Unfortunately, nothing changes…

 ![Screenshot 2024-03-08 165527](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/c/3c208ba6b5be478b5575114f3e40e20012981e52.png)

---

<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: [March 8, 2024, 10:03am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/4 "2024-03-08T10:03:46Z")

</div>

Perhaps the differences are smaller than that, but I’m pretty sure that’s what’s causing the discrepancy. If you click into those columns one by one you will see the actual values, which may include many decimal places.

In any case, try the following:

- Change your math column as follows:

```auto
Round(G,2) - Round(T,2)

```

- Then add a second math column using `Round(N,2)`, where `N` is your Nett\_Ton column.
- Then compare the two math columns in your if-then-else column

---

<div class="post-metadata">

### Author: ![Bungchow\_IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bungchow_ideapps/32/49062_2.png) [@Bungchow\_IDEApps](https://community.glideapps.com/u/Bungchow_IDEApps)
#### Post date: [March 8, 2024, 10:21am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/5 "2024-03-08T10:21:03Z")

</div>

Still not any changes… 😔

 ![Screenshot 2024-03-08 171229](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/a/ba8dc2b66b7a913f6ec94f56a04d74b2be0af949.png)

 ![Screenshot 2024-03-08 171331](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/6/1660affeef06844f8339d80fa95ec5575fac610b.png)

 ![Screenshot 2024-03-08 171405](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/a/7a5ffb1267368ced157ca8133ad769884a638347.png)

---

<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: [March 8, 2024, 11:16am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/6 "2024-03-08T11:16:03Z")

</div>

Okay, that’s interesting.  
There is something that I’m missing here, but I don’t know what it is.  
Let’s wait and see what @Jeff_Hager says. He might spot something that I’ve missed.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [March 8, 2024, 1:05pm UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/7 "2024-03-08T13:05:38Z")

</div>

I thought the rounding would do the trick. Can subtraction present a floating point issue?

I think the first thing I would try is to change Check\_NettoTon to round the result instead of rounding each number individually.  
`Round(G-T, 2)`

If that doesn’t work, I’d probably scrap everything else, go back to one math column, but set it up like this. If the result is zero, then it’s a match.  
`Round(Round(N,2) - Round(G-T, 2),2)`

---

<div class="post-metadata">

### Author: ![Bungchow\_IDEApps](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bungchow_ideapps/32/49062_2.png) [@Bungchow\_IDEApps](https://community.glideapps.com/u/Bungchow_IDEApps)
#### Post date: [March 9, 2024, 5:24am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/8 "2024-03-09T05:24:32Z")

</div>

The first solution works! Thanks a lot @Darren_Murphy and @Jeff_Hager 🙏

 ![Screenshot 2024-03-09 122122](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/d/7d07e4c8227c1179a79e40e8d1eaeae730a9278d.png)

---

<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: [March 16, 2024, 5:25am UTC](https://community.glideapps.com/t/math-or-ite-column-bug/71516/9 "2024-03-16T05:25:17Z")

</div>

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