Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Need help for Formula

Pinky
8 - 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   
2 REPLIES 2
rafalolbert
ACE Emeritus
ACE Emeritus

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?

PhilipMannering
16 - Nebula
16 - Nebula

Hi Pinky,

 

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

Here's another solution.

 

WorkflowWorkflow

 

 

Thanks,

Brain (Philip)

Labels