# Math parameters min / max

**URL:** <https://community.glideapps.com/t/math-parameters-min-max/22608>\
**Category:** Feature Requests\
**Created:** [February 11, 2021, 9:06am UTC](https://community.glideapps.com/t/math-parameters-min-max/22608 "2021-02-11T09:06:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [February 11, 2021, 9:06am UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/1 "2021-02-11T09:06:24Z")

</div>

Hello,  
I would like to be able to use unlimited number of parameters for Min & Max functions (like in Sheet, Excel)

I now only use Glides tables so I am stuck.

---

<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:** [February 11, 2021, 12:19pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/2 "2021-02-11T12:19:22Z")

</div>

What are you trying to do?

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [February 11, 2021, 12:22pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/3 "2021-02-11T12:22:03Z")

</div>

Hello,  
The Min of 20 columns

I could do the min (C1, C2) then the min of the result with the following column, …  
But that’s 20 more columns

---

<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:** [February 11, 2021, 12:48pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/4 "2021-02-11T12:48:17Z")

</div>

Yeah that’s a few. 😉 I was hoping the data would be in rows because you can use a rollup column to find the minimum from multiple rows. One thing you could try is to embed a MIN within a MIN. Something like this:

```auto
MIN(C1, MIN(C2, MIN(C3, MIN(C4, C5))))

```

Agreed that math functionality is a little limited. Multiple parameters, or an array, or direct access to the contents of an entire column would be nice.

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [February 11, 2021, 1:23pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/5 "2021-02-11T13:23:34Z")

</div>

Your solution:  
MIN (P1, MIN (P2, MIN (P3, MIN (P4, MIN (P5, MIN (P6, MIN (P7, MIN (P8, MIN (P9, MIN (P10, MIN (P11, MIN (P12, MIN ( P13, MIN (P14, MIN (P15, MIN (P16, MIN (P17, MIN (P18, MIN (P19, P20)))))))))))))))))))  
works. 😂

---

<div class="post-metadata">

**Author:** ![Clint\_Nelms](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/clint_nelms/32/38072_2.png) [@Clint\_Nelms](https://community.glideapps.com/u/Clint_Nelms)\
**Post date:** [April 2, 2022, 5:13pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/6 "2022-04-02T17:13:20Z")

</div>

hi All  
just wanted to shout out to this old post that while the nested Min works, i found a number of issues when using it. for example, it correctly calc’s the min out of multiple numbers, however, i am completely unable to display that in a basic table. same is true for calculations with it, they work on the data sheet of a glide table but are completely unreadable to the user interface of an app. my guess is that there is a translation in which the UI sees a nested statement like MIN(C1, MIN(C2, MIN(C3, MIN(C4, C5)))) as NULL… not sure how to report this as a bug but I really feel like we need this fixed… cheers! Clint

---

<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:** [April 4, 2022, 2:36am UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/7 "2022-04-04T02:36:55Z")

</div>

Do you have any screenshots of how you have this set up in your data and what’s happening on the UI side? I don’t see any reason why it shouldn’t work.

---

<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:** [April 4, 2022, 3:09am UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/8 "2022-04-04T03:09:21Z")

</div>

With all the new plugin column types, there could be an alternative way to approach this…

- Use a MakeArray column to create an array of all the columns involved
- Use the Sort Array plugin to sort it
- Use a Single Value column to pick the first element from the sorted array (eg. the minimum value)

More columns, of course. But probably a bit less error-prone 🙂

---

<div class="post-metadata">

**Author:** ![Werther](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/werther/32/60106_2.png) [@Werther](https://community.glideapps.com/u/Werther)\
**Post date:** [June 29, 2023, 1:44pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/9 "2023-06-29T13:44:34Z")

</div>

perfect, Darren!  
thanks

---

<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:** [January 25, 2024, 3:22pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/10 "2024-01-25T15:22:55Z")

</div>

> [@Darren\_Murphy](#):
>
> - Use the Sort Array plugin to sort it
> - Use a Single Value column to pick the first element from the sorted array (eg. the minimum value)

Could you just use a rollup → minimum instead?

---

<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:** [January 25, 2024, 3:23pm UTC](https://community.glideapps.com/t/math-parameters-min-max/22608/11 "2024-01-25T15:23:47Z")

</div>

Yes! 👍
