Free Trial

Alteryx Designer Desktop Discussions

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

Looping in Alteryx

sindhu44
6 - Meteoroid

Hello, I have 2 datasets, first data set contains all loans and 2nd data set contains list of auditors #1 to #5. I would like to loop auditors #1 to #5 for first data set of all loans, the loans number can vary every week could be any number, how can i design this logic using ALteryx, attaching my workflow with some sample data set, thank you.

 

Example Input:

Loan#Auditor Assigned
11 
21 
31 
41 
51 
61 
71 
81 
91 

 

Auditor #Auditor Name
1Aud 1
2Aud 2
3Aud 3
4Aud 4
5Aud 5

Example Output: 

Loan #Auditor
1Aud 1
2Aud 2
3Aud 3
4Aud 4
5Aud 5
6Aud 1
7Aud 2
8Aud 3
9Aud 4
3 REPLIES 3
OTrieger
12 - Quasar

@sindhu44 
I'm not 100% clear on what you would like to achieve. Do you want to split the amount of loans equality between the auditors?

Hsandness
8 - Asteroid

@sindhu44 

 

I don't think you need a loop for this if the amount of auditors is predetermined. You could achieve this by creating a RecordID column with the Multi-Row Formula tool and continuously recreating RecordID 1 through 5 for the loans dataset. You'll join the loan dataset onto the auditor data set after giving each auditor their own RecordID.

 

 

If the amount of auditors changes, you could create this as an app and adjust values in the Multi-Row Formula tool or use an iterative macro instead.

JosephSerpis
17 - Castor
17 - Castor

Hi @sindhu44 think there a couple of ways to handle this challenge my first thought was an Iterative Macro which will loop through. Then I thought I could use a count of your auditors create a rank field which will use the total count of your auditors to create a rank through your loans one to five. Then join the auditors by the rank field. Using this approach if your auditors increase or decrease then the count of auditors will change the ranking dynamically.

 

Screenshot 2024-10-08 164118.png

Labels
Top Solution Authors