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.

INCREMENTALLY DECREASE A THRESHOLD VALUE TILL A CONDITION IS MET - REPEAT

Shahas
8 - Asteroid

Hi Everyone,

This is a repeat question as i couldn't get an answer earlier. Below is the workflow stage I'm at.

Shahas_0-1680242762440.png

 


After this stage, I have to check for the sum of New Delta. If it's above 20k, the threshold of 'abs([Delta Adj])' has to be decreased 500 every time until the sum of New Delta is below 20k. 

I believe we need to use a iterative macro here. As I haven't worked using macro, would be grateful to anyone who can assist on the same.

 

A member of the community provided me with the following solution : 

 

Shahas_1-1680242811304.png

 

Shahas_2-1680242811311.png

 

The issue with this solution is that, it checks for every row, whether its above 20k, and does the iteration. 

What I would like to have is to check whether the 'Sum' of 'New Delta' is above 20k and if so, 'Delta Adj' threshold should be reduced incrementally by 500 till the sum of 'New Delta' becomes less than 20k.

1 REPLY 1
mceleavey
17 - Castor
17 - Castor

Hi @Shahas ,

 

can you provide the current workflow and macro along with some dummy data so we can see what you're trying to do?

 

You can probably answer this yourself by getting to know iterative macros. The following resources will be useful:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Iterative-Macr...

https://community.alteryx.com/t5/Interactive-Lessons/Creating-an-Iterative-Macro/ta-p/657925

 

M.



Bulien

Labels
Top Solution Authors