Apr 05, 2021 01:42 PM
Hi,
I am experiencing unexpected behavior.
Is this expected behavior that MIN function in formulas doesn’t work with lookup fields that contain numbers (in the same format)?
Would be great if I someone can check & maybe I am getting this wrong?
Thanks in advance
Apr 05, 2021 01:51 PM
I would check the formatting on the lookup field and make sure it’s one of the first four. If not, the lookup thinks your number is a string (probably). I just tried using MIN with a lookup (currency original field) and it worked fine.
Apr 05, 2021 02:05 PM
Instead of creating a lookup field + formula field, create a rollup field that points to the number field and use this formula:
MIN (values)
Apr 05, 2021 02:24 PM
What if he doesn’t want the min of all the values, but the min between the number in each record and some constant that’s important to him?
Apr 05, 2021 02:55 PM
Not sure… that’s a little trickier since Airtable handles arrays relatively strangely. I think people have solved that problem before in other threads. I think it involves some combination of the ARRAY
functions.
Apr 05, 2021 04:10 PM
I also recommend using a rollup field instead of a lookup. Rollup formulas can include references to other fields in the same table as the rollup.