Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Apply RecordID on inbound and outbound airports leg

JEBS
6 - Meteoroid

Hi everyone!,

 

I am trying to apply the same LaneID across the outbound route and the inbound route but I am struggling to find the right method. Can anyone help?

 

Thx!

 

Sample data:

Current:

 

LegOriginDest
CPH-AMSCPHAMS
AMS-CPHAMSCPH
BCN-MXPBCNMXP
MXP-BCNMXPBCN
CDG-FCOCDGFCO
FCO-CDGFCOCDG

 

 

And requested to look like 

 

LegOriginDestLaneID
CPH-AMSCPHAMS1
AMS-CPHAMSCPH1
BCN-MXPBCNMXP2
MXP-BCNMXPBCN2
CDG-FCOCDGFCO3
FCO-CDGFCOCDG3
4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @JEBS ,

 

Here is a workflow for the task.

 

Input: your table

Output: 

atcodedog05_0-1601565311982.png

Workflow

atcodedog05_1-1601565328368.png

Formula in Multi-row tool

IF [Dest]=[Row-1:Origin] 
THEN [Row-1:ID] 
ELSE [Row-1:ID]+1 ENDIF

 

Hope this helps : )

 

If this post helps you please mark it as solution. And give a like if you dont mind : )

 

jdunkerley79
ACE Emeritus
ACE Emeritus

I would suggest the Make Group tool will do most of the hard work:

jdunkerley79_0-1601565583325.png

 

It will work out the groups. A multirow formula can be used to make LaneIDs

This will work if destinations are unique - will get confused I expect if not!

 

Have attached a sample

JEBS
6 - Meteoroid

So simple! Thanks

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @JEBS 

 

Cheers 🎉 and happy analyzing 😀

Labels