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

alteryx Community

# Alteryx Designer Discussions

SOLVED

## Sum budget until it reaches the limit

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 ID Budget Date Limit amount 123 100 2022-10-24 400 123 100 2022-10-25 400 123 250 2022-10-25 400 123 100 2022-10-26 400 456 250 2022-11-04 325 456 50 2022-11-04 325 456 100 2022-11-05 325 456 150 2022-11-08 325

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 ID SUM_Budget 123 200 456 300

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

5 REPLIES 5
13 - Pulsar

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

Many thanks

Shanker V

17 - Castor

@sophievanluin One way of doing this

15 - Aurora

One way of doing this

13 - Pulsar

One way of solving this.

.

Many thanks

Shanker V

13 - Pulsar

Eliminated one step and here is the same output.

Many thanks

Shanker V

Labels