Appsheet expression to filter a list of clients based on their total spendings

I have a table of two columns one for clients and the other belongs to their spendings.

I wish I could find a possible way to filter this table in order to get a desired total of spendings, exemple:

Clients  || spendings

peter    || 10

tomy     || 7

liz          || 5

antony  || 4 

I want to get only the clients in which the sum of thier spendings = 17 (or as close as possible) so the result can be:

clients  || spendings

peter    || 10

tomy     || 7

I would be grateful if anyone could help.

0 1 69
1 REPLY 1

Assuming you have a table of clients, create a virtual column in there with a SUM(SELECT()) to calculate each client's total spending from your main data table. Then create a slice on the client table according to that VC's value.

https://help.appsheet.com/en/articles/2357307-sum

https://help.appsheet.com/en/articles/2357314-select

https://help.appsheet.com/en/articles/895302-slices-the-essentials

 

Top Labels in this Space