Aug 31, 2018 01:04 PM
Hi Guys.
Here’s my question, quite simple actually… like the title says, i am trying to get the highest value inserted in a column, I have tried the MAX() function, but it doesn’t give me the highest, it just gives me the same number from the column im using. For example: I have a column named: “number of quotes” and each row has a random number, the highest being 200. in another column named “highest quote number” I wanted to get that number(200) from “number of quotes” and apply to all other rows…since im trying to use a formula in witch one of the params is the highest current number in the “number of quotes” column.
I hope I made myself clear, here’s the formula im trying to use, if it helps:
new_value = ( (old_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
Sep 01, 2018 09:01 AM
The spreadsheet metaphor for Airtable is an imperfect one — and I’m going to make it even more imperfect. If you think of a spreadsheet as supporting calculations addressable in two dimensions — row and column — then Airtable supports only one-dimensional calculations: that is, only within a row. (Of course, Airtable offers functionality spreadsheets lack.) There is no way to address directly a cell in a given row of a table in a calculation performed within a cell from a different row.
However, this is a way to do so indirectly. Elsewhere in the forum you’ll find a long post and example bases I wrote explaining how to perform such multi-record or cross-record calculations. Fortunately for you, your application doesn’t require as complex a solution as that post describes — but you will need a few of its components:
[Calc]
. (Create a new field; select ‘Link to another record’ as the field type; select ‘Create a new table’; name the new table.)'.'
, not someone dressed as in a Dickens’ novel).Ctrl-V
to paste the copied character into each cell of the column. This will create a new record in [Calc]
with the {Name}
of '.'
and link it to every record in your main table.[Calc]
, create a rollup field called {MaxQuotes}
. It should follow the link from [Calc]
to your main table and roll up {Number of Quotes}
using the aggregation function MAX(values)
.{HighestQuoteNumber}
; it should follow the link to [Calc]
and look up {MaxQuotes}
.That’s it. Keep in mind this will work for all records currently in your main table; any records later added to [Main]
will need to be linked to the '.'
record in {Calc}
. This can be done manually by clicking on the plus sign ('+'
) in the linked record field, by copy-and-pasting a ','
into the new record’s linked-record field, or by clicking on the fill handle (the small '+'
in a cell’s lower-right corner) of the previous row in the linked-record column and dragging it into the newly-added record.