# Maximum value does not match

**URL:** <https://community.glideapps.com/t/maximum-value-does-not-match/75229>\
**Category:** Ask for Help\
**Created:** [July 29, 2024, 1:18am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229 "2024-07-29T01:18:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgalihm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mgalihm/32/73257_2.png) [@mgalihm](https://community.glideapps.com/u/mgalihm)\
**Post date:** [July 29, 2024, 1:18am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/1 "2024-07-29T01:18:31Z")

</div>

Hi everyone,

I have a trouble with setting the maximum value of number entry.  
I create the number entry, then I set the maximum value from the column with number like this  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/dff6252a3b61a7f71f2ab5158b9778df5fa13c7e.png)  
but the maximum value does not match, it has more decimal number like this  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/9/1970bd6d626683803d10db95c16458bf029d036e.png)

How to fix it?

---

<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:** [July 29, 2024, 1:50am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/2 "2024-07-29T01:50:37Z")

</div>

Looks like a floating point arithmetic issue.

You said the max value comes from a “column with number”. Is that a Math column, or the result of a math formula? Assuming yes, use a `Round()` function in your Math formula to force the precision to zero decimal places.

---

<div class="post-metadata">

**Author:** ![mgalihm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mgalihm/32/73257_2.png) [@mgalihm](https://community.glideapps.com/u/mgalihm)\
**Post date:** [July 29, 2024, 2:20am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/3 "2024-07-29T02:20:51Z")

</div>

yes that was a math column

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/2/a2815f50a97f5d7ca78cc6358fbca742167b915b.png)  
but still the same

---

<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:** [July 29, 2024, 2:26am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/4 "2024-07-29T02:26:29Z")

</div>

Did you add the `Round()` function like I suggested?

Your formula should look like:

```auto
Round(invoicenom*(1+margin),0)

```

Or you could use:

```auto
Trunc(invoicenom*(1+margin))

```

Either way should work.

---

<div class="post-metadata">

**Author:** ![mgalihm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mgalihm/32/73257_2.png) [@mgalihm](https://community.glideapps.com/u/mgalihm)\
**Post date:** [July 29, 2024, 2:36am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/5 "2024-07-29T02:36:01Z")

</div>

Thank you, it works

---

<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:** [August 5, 2024, 2:36am UTC](https://community.glideapps.com/t/maximum-value-does-not-match/75229/6 "2024-08-05T02:36:51Z")

</div>

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