We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

Need on Recursive (iterative macro?)

melissa_m
8 - Asteroid

Hello Alteryx Community,

 

I haven't done much workflow utilizing iterative macro and kinda getting stuck. Appreciate any guidance on this.

 

I have a dataset with 3 datapoints. Number, Moved To, Moved From.  A number can transfer multiple times, but regardless of how many times it has transferred, I need to associate it with the original Number.   

 

Thank you all for your help!

 

sample data.PNG

 

6 REPLIES 6
Qiu
19 - Altair
19 - Altair

@melissa_m 
Can you elaborate your logic here?
I dont understand how do you get the original number from Number, Moved To, Moved From

melissa_m
8 - Asteroid

Hi @Qiu ,

 

Scenario 1:

 

Number 1 moved to Number 2

Number 2 moved to Number 3

 

For both Number 1 , 2 and 3, I need to say that the Original Number is Number 1

 

Scenario 2:

 

Number 4 moved to Number 10

Number 10 moved to Number 15

Number 15 moved to Number 16

Number 16 moved to Number 20

Number 20 (hasnt not moved yet)

 

For number 4, 10, 15, 16, 20, I need to identify that the Original Number for all of them is Number 4.

 

Hope that clears it up?

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @melissa_m,

 

Should number 3 not also show as original number 1?

 

Kind regards,

Jonathan

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @melissa_m,

 

I've used an iterative macro to work my way down the numbers to the original, since 3 is originally a subset of 2 and therefore 1 i've come to that conclusion but it can be adapted if that's the wrong assumption!

 

JonathanSherman_0-1636029421684.png

 

 

Kind regards,

Jonathan

melissa_m
8 - Asteroid

@Jonathan-Sherman , thank you so much for doing this!  The solution worked for what I needed to derive.  

Jonathan-Sherman
15 - Aurora
15 - Aurora

Great news! Nice challenge 😊

Labels