Skip to main content

Operation on field with multiple values

  • February 28, 2025
  • 1 reply
  • 32 views

Forum|alt.badge.img+1

I use the software to keep track of all my craft projects as well as all my supplies. I am trying to calculate the price of the supplies used for my projects ("cost per item * # of items" kind of thing), but one of my fields has multiple values. When I try the below formula, it always returns a 1.0.

{Price/sq in (from Vinyl)}*{Area of Vinyl Used (sq in)}
 
Is there a way to have each value in the "price/sq in" field be multiplied by the "Area Used" field (which only has 1 value)?

1 reply

Alexey_Gusev
Forum|alt.badge.img+25
  • Brainy
  • February 28, 2025

these is no simple way to use a formula for multiple values, but since it's a lookup from other table, you can add 'Area of Vinyl Used (sq in)' as lookup in this other table, where each of values in it's own record, Add 'Cost of Vinyl' formula there, and get the result here as lookup. (also you can add Rollup to get MAX, MIN, AVERAGE of values for this record )
Note that sometimes Airtable cannot use Lookup as value, because Lookup is array. When you receive ERROR# or smth like that, to convert array to string, use {Field}&'' . To convert array to number, use {Field}+0
It works only when array has the single number. Multiple numbers considered as TRUE (field not empty) converted to 1, that's why you has such result. Empty considered as FALSE converted to 0 .