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

Loop through records - Iterative macro

Shank
8 - Asteroid

Dear All,

 

I am new to Alteryx macro development. Were I have to loop through records and provide them the end result as ok or not ok. Below is the case can some one guide me how can I achieve it. 

 

Case: I have a set of records grouped at Area level (A & B) and assigned a sequence no (Seq) 

For Each ID's in a area i need to check if my sequence is always in ascending order (Comparing with row -n) then i have to mark it as OK

 

in below example for ID 952 sequence is 4 but for previous id sequence is 6 which is not in order then i need to mark it as not ok. similarly for ID 3564 sequence is 9 again this is not in sequence because when i compare data with Row - 2 (i.e., 11 which is grater than 9) hence it is not in sequence and marked as not ok 

Sequence.

 

In this case sequence is dynamic and sequence can be assigned and jumbled at any level. so, I cannot use multirow formula as row -n is not defined.  for example for  A we have (3 sequence assigned)  and for b we have (12 sequence assigned) it can be assigned at 100's as well.

 

can some one help on this to achieve?

 

ID'sAreaSeqResult
101A1ok
201A2ok
301A3ok
401B-1ok
501B2ok
666B3ok
657B5ok
689B6ok
952B4Not-ok
11B7ok
12B10ok
1214B11ok
2569B8Not-ok
3654B9Not-ok
2568B12ok
13 REPLIES 13
Shank
8 - Asteroid

@atcodedog05 

 

Thanks for the solutions and helping me on achieving this!

atcodedog05
22 - Nova
22 - Nova

Hi @Shank 

 

Happy to help : )

 

This is an amazing and quite a complex problem statement this would be a great Weekly Challenge. Can I get your permission to submit this as a weekly challenge?

 

Cheers and have a nice day!

atcodedog05
22 - Nova
22 - Nova

Thank you @Shank 🙂

 

I am assuming your like is a yes to submit it as a weekly challenge.

 

Cheers and have a nice day!

Shank
8 - Asteroid

Hi @atcodedog05 

 

Yes! You can submit this for weekly challenge.

 

best regards,

Shank

Labels