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.
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
User | Count |
---|---|
36 | |
31 | |
30 | |
20 | |
17 |