Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!

Alteryx Designer Discussions

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

Sum budget until it reaches the limit

sophievanluin
7 - Meteor

Hi,

 

I'm working on a workflow where I would like to calculate the total budget. This budget, however, cannoot exceed the limit. So when the limit is reached the budgets of the other days will not be included.

 

See below an example:

 

Project IDBudgetDateLimit amount
1231002022-10-24400
1231002022-10-25400
1232502022-10-25400
1231002022-10-26400
4562502022-11-04325
456502022-11-04325
4561002022-11-05325
4561502022-11-08325

 

 

So, for Project 123 the limit is 400. That means that only the sum of the first two rows is below budget, which means the total budget is 200

 

For Project 456 the limit is 325. That means that the sum of the first three rows is below budget, which means the total budget is 300

 

 

The output I would like to receive:

 

Project IDSUM_Budget
123200
456300

 

In the real file, this must be done for many projects. Is there a way how I can calculate this?

 

 

Thanks in advance!

5 REPLIES 5
ShankerV
13 - Pulsar

Hi @sophievanluin 

 

You can use the multi-row formula tool to get the desired output.

 

Many thanks

Shanker V

binuacs
17 - Castor

@sophievanluin One way of doing this

 

binuacs_0-1670419865338.png

 

Felipe_Ribeir0
15 - Aurora

Hi @sophievanluin 

 

One way of doing this

 

Felipe_Ribeir0_0-1670419980108.png

 

 

ShankerV
13 - Pulsar

Hi @sophievanluin 

 

One way of solving this.

 

ShankerV_0-1670419951065.png

.

Many thanks

Shanker V

ShankerV
13 - Pulsar

Hi @sophievanluin 

 

Eliminated one step and here is the same output.

 

ShankerV_0-1670420150967.png

 

Many thanks

Shanker V

 

 

Labels