Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Sum rows until an amount is reached

miguelfreitas
5 - Atom

Hello all, 

 

First thanks in advance for any help with this.

 

I have a (big) amount of records (corresponding to items on a store) and, among other fields, I have a numeric field with the price of each item. These records are sorted in a specific way, so that on the top of my records I have the "top priority" items and on the bottom the "bottom priority" items.

 

I would like to sum the first N elements so that the sum of their price is equal to a certain amount X (and this amount X can vary according to a user input).

 

what would be the best way to achieve this? thanks in advance.

 

Miguel

2 REPLIES 2
Luke_C
17 - Castor

Hi @miguelfreitas 

 

The running total tool should help with this. Without seeing any sample data it's a bit tough, but I expect you should be able to use the running total and a filter tool to identify the records you need. 

miguelfreitas
5 - Atom

thanks a lot!

Labels