Alteryx Designer Desktop Discussions

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

Replacing values in one column with values from another if another column is NULL

trevian3
7 - Meteor

Hello Alteryx Community,

 

I'm probably overthinking this, but I have source data organized as shown below. What I want to do is, for the null values in the prioritized fill line column, I want to replace the capacity in the capacity column with the capacity of the other capacity value that is shown for the fill line that has a fill line and prioritized fill line value. 

 

For example, for the fill line "Sample2" shown below, for the line that has a null value in the prioritized fill line column, I want to replace that capacity that's in there for that row of 2520000 with the one below it of 63000000.

.

Fill LinePrioritized Fill LinePkg LinePrioritized Pkg LineCapacity
Sample1Sample1SETUP3SETUP337000000
Trade6 to Sample2/Sample4Trade6SETUP6/SETUP9SETUP663000000
Sample2 MANUELMANUEL2520000
Sample2Sample2SETUP6SETUP663000000
Sample3 MANUELMANUEL2520000
Sample3Sample3SETUP8SETUP861000000
Sample4Sample4SETUP9SETUP977000000
Trade5 MANUELMANUEL2520000
Trade5Trade5SETUP1SETUP1140000000
Trade5Trade5SETUP1/PharmadisSETUP1140000000
Trade5Trade5SETUP7SETUP7140000000
Trade5Trade5SETUP7/SETUP5SETUP7140000000
Trade6Trade6SETUP1SETUP1140000000
Trade6Trade6SETUP4SETUP4140000000
Trade6Trade6SETUP4 to SETUP1SETUP4140000000
Trade7Trade7OPTILINE1OPTILINE1200000000


Is there a way to do this with a formula? 

__PRESENT

4 REPLIES 4
vannat
6 - Meteoroid

I would filter out the nulls, summarize then join back to your original dataset.  throw in a formula to replace the null value.  

 

2025-02-04 14_59_05-Alteryx Designer x64 - _New Workflow1.jpg

binuacs
21 - Polaris

@trevian3 one way of doing this

image.png

CoG
14 - Magnetar

Here is what I believe to be the optimal strategy; you can Sort and then use the Multi-Row Formula Tool to propagate the values downward:

 

Screenshot.png

 

Hope this helps and Happy Solving!

trevian3
7 - Meteor

Thanks everyone for all of the suggestions! 

Labels
Top Solution Authors