Skip to main content

Min function doesn't work with lookup fields?

  • April 5, 2021
  • 5 replies
  • 48 views

  • Known Participant

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

5 replies

Forum|alt.badge.img+18
  • Inspiring
  • April 5, 2021

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.


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • April 5, 2021

Instead of creating a lookup field + formula field, create a rollup field that points to the number field and use this formula:

MIN (values)


Forum|alt.badge.img+18
  • Inspiring
  • April 5, 2021

Instead of creating a lookup field + formula field, create a rollup field that points to the number field and use this formula:

MIN (values)


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?


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • April 5, 2021

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?


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.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • April 5, 2021

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.