Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

I am trying to create a for loop (Batch Macro)

christopherKiener12
7 - Meteor

for each File ID take the first 160 records where the risk numeric is the highest and where flag = 1. I assume this would be a macro solution just cant figure it out. Here is a sc of the fields. 

 

christopherKiener12_0-1683749367028.png

Also attaching some data  

4 REPLIES 4
binuacs
21 - Polaris

@christopherKiener12 Do you have the expected result?

christopherKiener12
7 - Meteor

The expected result would be 160 records for each file ID. where risk number is highest and where flag = 1.   I think there are 12 file ID (1-12) so 160X12 = 1920 records as the output 

christopherKiener12
7 - Meteor

Another way to put it would be 1920 ID's ranked based on the loop criteria provided 

binuacs
21 - Polaris

@christopherKiener12 Attaching the workflow, I had to create two batch macros for your use case, let me know it works for you

 

binuacs_0-1683751634242.png

 

Labels
Top Solution Authors