Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Select Preferred Value from 2 different row values

JPSeagull
8 - Asteroid

Hi. I thought my challenge would be simple using a coalescing formula, but I can't resolve my logic. 

 

I have this sample data in the first table below. My priority is, by each customer and order, to prioritize the weight in kilogram over pounds. For the first customer, Jones, the clerk entered both the kilograms and the conversion to pounds. However, in the final output, I need a column named, "Weight" and if kilograms exists, list that and if not, list pounds. So the final output would look like the second table below.

 

CustomerOrder IDItem LineItem DescValue
Jones803041Weight150
Jones80308817Weight in kg68.04
Smith803141Weight 
Smith80318817Weight in kg72.02
Johnson803241Weight165
Johnson80328817Weight in kg 

 

CustomerOrder IDWeight
Jones803068.04
Smith803172.02
Johnson8032165

 

Attached is the workflow. This is just sample data, but I think the workflow below is way too basic. Where I am stuck is that I get this and I want to rename the Item Desc to just "Weight" and I need to get the pounds to show for Johnson instead of a null. Any suggestions?

 

CustomerOrder IDItem LineItem DescValue
Johnson80328817Weight in kg 
Jones80308817Weight in kg68.04
Smith80318817Weight in kg72.02
 
 

weight.PNG

2 REPLIES 2
usmanbashir
11 - Bolide

@JPSeagull - see attached workflow. Hope this helps!

 

**Updated the workflow to have two outputs - not sure which one you wanted.

JPSeagull
8 - Asteroid

@usmanbashir Thank you! I appreciate the two options and casting the string to discern kg or lbs. Very clever.

Labels