Returning the value associated with a max value in a column

Hey y’all —

I’ve got a table of orders: product, date, quantity, etc. And I’m trying to return the quantity for the most recent order for each product in my product list table.

I’m new to coda’s formula structure and can’t figure out how to return the quantity (I was able to grab the latest date for each product).

Any suggestions?

Thanks!

Hi Gus,

Welcome to Coda! Hope you will find it useful.

Could you provide an example of how you want to see the result? I assume it a view of the basic table?

In the attached example I have created a column that finds the Max(), and then created a formula based filter to show only the row where the value in the source column is equal to the value in the Max column.
(This has been changed to reflect the second answer in the thread)
thisRow.colNumber=thisRow.colmax in the example below:

So I’m not sure how to embed a doc like you did but here’s a screenshot of what I’d like it to look like:

Obviously I just hard coded the values but I’d like “most recent order” and “most recent quantity” to be pulled from the Orders table

Does that help to clarify what I’m trying to do?

Thanks Gus, it is clear.

I have made changes to the doc: There is another column towards the right of the table - the view now uses that value to filter.

To embed, do the following:
Click on Share, top right of the screen. The click on Embed tab, click on copy embed button, and paste where you would like it to appear.

image

Regards
Piet

1 Like