Feb 21, 2021 11:13 AM
I’m looking for a formula that will return the smallest 8 of the last 20 items recorded. Here is the formula that I use in Excel to retrieve the information from a table:
=AVERAGE(SMALL(INDEX(Golfer[Index],ROWS(Golfer[Index])-20):INDEX(Golfer[Index],ROWS(Golfer[Index])),{1,2,3,4,5,6,7,8}))
Any thoughts that this is/can be supported in AirTable?
Feb 22, 2021 09:49 PM
Welcome to the community, @Mike_Torrence! :grinning_face_with_big_eyes: Airtable doesn’t have an existing function that behaves like your description of Excel’s SMALL
function (which I’m not familiar with, but that’s not surprising considering that it’s been at least a decade since I’ve touched Excel). That aside, I can think of at least two ways to pull this off:
A possible third option would be deeper than #2: write (or get assistance to write) a custom app. Pros: total flexibility to make the app do what you want, and it’ll update dynamically as your data changes. Cons: custom apps take more time to develop, partly because they’re at least a couple orders of magnitude more complex than a “plain” script that the Scripting app can run.
Feb 23, 2021 03:14 PM
Thanks for your response. I’m going to be upgrading to a Pro plan to try to script this myself. Does the API support something like Python…
Feb 23, 2021 06:01 PM
If you use the standard REST API to interact with Airtable from an outside source, I believe that Python will work (not 100% sure, as I haven’t yet worked in that type of environment). All internal Airtable scripting—in the Scripting app, in scripting actions in automations, and when building custom apps—is done in JavaScript.
Feb 23, 2021 06:14 PM
Ok. Thanks. I can handle that I think.