community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Iterative macro: Interface designer does not have input and output drop down

Atom

Hello,

I am trying to do some iteration with a macro.

I am not able to specify which tool will be the iteration input and which will be the output.

I am also not able to specify the maximum number of iterations.

 

Any help would be appreciated

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @niyi66 

 

If you insert a Control Parameter in your macro, it automatically changes to a Batch Macro, and the Batch macro has a different way of working than the Iterative Macro.

Could you please explain a little bit more what you're trying to do and what your data and final workflow with the macro would look like?


Cheers,

Atom

Thanks @thableaus 

I attached an excel file.

I am trying to generate Column F and G

To do this i have to iterate through the values in Column B.

The work flow i built has calculated index 1 for me correctly now i just need it to go back and pick index 2. Thats where im stuck (Making it go back to pick the next value)

 

This what im trying to achieve:

 

Rules for Valleys

For each index find lowest valley after self
Set range from next lowest valley to self
Find 1st highest peak in range
Calculate magnitude by subtracting self valley from first highest peak in range
Other valleys between self and first peak in range use this formula “the magnitude = previous peak - value”

Example 1

Let's start with index 1 which has a value of 3 the lowest value after itself is index 5 with a value of 2
So range is all the values from index 1 to index 5 (next lowest valley)
The first occurring highest peak is index 4 with a value of 7
7-3 = 4

Eg. 2

Next valley is index 3 which has a value of 5
Since index 3 falls between the Index 1 range (index 1 - index4)
Magnitude = Previous peak - index 3 (6-5 = 1)

Rules for peaks

For each index find highest peak after self
Set range from next highest peak to self
Find 1st lowest valley in range
Calculate magnitude by subtracting self valley from lowest value in range
Other peaks between self and first lowest valley in range use this formula “the magnitude = previous valley - peak”

Example 1

Let's start with index 2 which has a value of 6 the highest value after itself is index 4 with a value of 7
So range is all the values from index 2 to index 4 (next highest peak)
The first occurring lowest valley is index 3 with a value of 5
6-5 = 1

Eg2

Let's start with index 16 which has a value of 7 the highest value after itself is index 18 with a value of 6
So range is all the values from index 16 to index 18 (next highest peak)
The first occurring lowest valley is index 19 with a value of 3
7-4 = 3

Labels