Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Calculate the amount to a specific value and any remaining to calculated

DanielCarro
8 - Asteroid

Hi guys,

 

I am in a situation which I need some help on Alteryx.

 

I have the following situation:

 

EmployeeShare Purchase DateAmount of Shares 
11103/05/20135 
11117/11/201214 
11110/11/201210 
11107/07/20125 
11104/04/20126 
11115/11/201115 
11105/10/201110 
11102/03/201110 
11101/02/20105 

 

So I need to pick the first 45 shares (in this case the earliest shares purchased), sum up until 45 shares, then recalculate to the number of shares are correct and in line. So my goal is to achieve the 'new amount of shares' column

 

 

EmployeeShare Purchase DateAmount of SharesFirst 45 sharesNew Amount of Shares
11103/05/20135 5
11117/11/201214 14
11110/11/201210 10
11107/07/20125 5
11104/04/2012651
11115/11/201115150
11105/10/201110100
11102/03/201110100
11101/02/2010550

 

Much appreciated for any help.

 

Kind Regards,

Dan

3 REPLIES 3
phottovy
13 - Pulsar
13 - Pulsar

Hi @DanielCarro ,

 

Here is one way of accomplishing the calculation. I added a second input in case not all employees have the same 45 shares. 

phottovy_0-1684428412562.png

 

DanielCarro
8 - Asteroid

Hi @phottovy 

 

Amazing, worked like a charm

DanielCarro
8 - Asteroid

Thank you @phottovy 

Labels