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

Alteryx designer Discussions

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

Need help for Formula

Highlighted
Asteroid

Hi,

 

I have data like shown in below.

 

Input 
IDName
111America
111America
111America
111West Virginia
111West Virginia
222South America
222Portland
222Florida
222Florida
333Newyork
333Newyork
333California
333Nevada
333Nevada
444Chicago
444Chicago
444Chicago
444Ohio
444Ohio

 

I am expecting my output like below.

From and to: From where it is starting and where it is going. 

Final destinations: This is always last name for each id.

Output   
IDFromToFinal Destination
111AmericaWest VirginiaWest Virginia
111   
111   
111   
111   
222South AmericaPortlandFlorida
222PortlandFlorida 
222   
222   
333NewyorkCaliforniaNevada
333CaliforniaNevada 
333   
333   
333   
444ChicagoOhioOhio
444   
444   
444   
444   
Bolide

Hi @Pinky,

 

Nice puzzle by the way!

 

This is what i have to share with you, methodology is as follows:

 

- only take forward unique records across both columns

- count how many records there are for each id and create 2 sub-workflows

- get record at id group and lookup corresponding values as: from, to , destination (this is different between 2 sub-workflows)

- Cross-Tab data and Union

- point of difference for the 2nd sub-workflow is that for each id we append a new record as (from, to), which is derived from (to, final_destination) 

 

img1.JPG

 

Thanks,

Rafal

 

#Excuse me, do you speak Alteryx?

Alteryx Certified Partner

Hi Pinky,

 

Looks like you might have taken a wrong turn there @rafalolbert 

Here's another solution.

 

From_To.jpgWorkflow

 

 

Thanks,

Brain (Philip)

Labels