Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Iterative Macro

ShelleyWu
6 - Meteoroid

Hello all,

 

This is my first time using an Iterative Macro and I've encountered some issues where the iteration doesn't stop until it hits the limit. I'm not sure if there are any mistakes in my logic settings. Could anyone please help me take a look? Thank you so much!

 

ShelleyWu_0-1684198434384.pngShelleyWu_1-1684198578029.png

 

 

 

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@ShelleyWu 
Can you explain what you are trying to do here?
I check the formula in the filter and I can not quite figure it out the intention here.

if [Iteration]<=3 then
(ToNumber([Year]) >= ToNumber([Loan Year])-[Iteration]
and 
(ToNumber([Remaining term])>= [Loan Duration]-1 and ToNumber([Remaining term])<= [Loan Duration]+1)
and 
([Max Rating (Moody, Fitchs, SP)] >= [Loan Rating Number]-1 
and
 [Min Rating (Moody, Fitchs, SP)] <= [Loan Rating Number]+1)
)
elseif [Iteration]>3 and [Iteration] <=6 
then 
(ToNumber([Year]) >= ToNumber([Loan Year])- ([Iteration]-3)
and 
(ToNumber([Remaining term])>= [Loan Duration]-2 and ToNumber([Remaining term])<= [Loan Duration]+2)
and 
([Max Rating (Moody, Fitchs, SP)] >= [Loan Rating Number]-1 
and
 [Min Rating (Moody, Fitchs, SP)] <= [Loan Rating Number]+1)
)
else
(ToNumber([Year]) >= ToNumber([Loan Year])- ([Iteration]-6)
and 
(ToNumber([Remaining term])>= [Loan Duration]-2) and ToNumber([Remaining term])<= [Loan Duration]+2)
and 
([Max Rating (Moody, Fitchs, SP)] >= [Loan Rating Number]-2
and
 [Min Rating (Moody, Fitchs, SP)] <= [Loan Rating Number]+2
)
endif
geraldo
13 - Pulsar

@ShelleyWu 

 

In the iterative macro is this configuration.
Enter the macro
in the menu And follow these steps

geraldo_0-1684202281827.png

 

Interface Designer

geraldo_1-1684202320985.png

geraldo_2-1684202400336.png


Here is your 9 iteration setup.
and error option.
analyze the number of iterations before controlling internally in the macro.

 

geraldo_3-1684202533395.png

 

 

 

 

Labels