community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Multi field formula using two inputs

Atom

Hello,

I am very new to Alteryx and I am wondering if anyone can provide some direction to what I want to achieve here.One of the input file looks like this:

 

PlantCapacity
ABQ              82
ALN           703
ATL           473
BLM           573

 

The other input file looks like this:

 

PlantCategoryQuantityStack Factor
ABQCAP101
ALNPEN2011
ATLCAP1901
BLMPEN342
KIMPEN452
LONCAP561
ABQPEN672
ALNCAP761

 

 

 

I am trying to check for Category =CAP in Input 2 file and keep summing up the quantities for all cap categories for that particular plant (lets say ABQ) until it reaches capacity (available in input1). Once it reaches that capacity or goes over that capacity, I want to update "Stack factor" column in all the  "PEN" category records for that plant to 2 in Input file 2. If the sum of the quantity for CAP categories for a particular plant never reaches the plant capacity in (input 1 file), then update the stack factor for all the PEN categories for that particular plant to 1 until the sum of "PEN" categories reaches the capacity. 

 

I am not sure if this logic can be implemented in Alteryx. Any help would be much appreciated. Thanks!

 

Magnetar
Magnetar

Hi,

 

I'm not sure if you are looking to do a sum of all the values and then compare to capacity, or to do a running total (where values beyond the capacity show a 2), so I created an example of each in the attached workflow.

 

The key is to use a Join to add the "Capacity" field to all relevant lines of the main dataset.

 

Hope this helps!

Labels