Sorting and filtering table row groups based on a summarised column

Hi all. Firstly, my question is an extension of an existing post I made recently.

Regarding groups, I often work with large CSVs at my org to analyse and share Cloud infrastructure billing reports. I can’t help but assume lots of people use Coda to manage financial information, given that Coda’s collapsible row groups feature is very well done, almost unbeatable.

Very often, I feel the need to sort a groups of rows based on a summary, for instance a subtotal cost. Here’s an example of the mess that I often deal with:

It would be very handy to be able to sort the row GROUPS based-off the summarised subtotal. I’m hoping this becomes possible without having to wrangle about another table :slight_smile:

1 Like

Hey @Akash_Agarwal - not sure if I understand the issue, but this might be a solve:

make a new number column with a formula like:

=thisTable.filter(currentValue.month = thisRow.month).Subtotal.sum().find(thisRow)

That will give you a kind of rowID for the sum of the Subtotal. Then group by that column first, with a second group for the date?

1 Like

Thanks for the response, Andrew!

Not sure if I understood this correctly… I modified the formula a bit:

And here’s what I see:


(the coloured groups on the left are project names)

Since I don’t quite understand how this formula is supposed to work, I created a simpler doc (you should have comment access):

Again, all I see are -1s. Here’s the formula:

1 Like

Had to make a copy of that sample doc (you can edit via this link)

I think it’s working now - it auto-sorts when the sum changes after adding new rows.

3 Likes

Thanks for the late response in getting back, I saw the email and forgot about it. Thanks for putting this together, Andrew!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.