Alteryx Designer Desktop Discussions

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

Iterative Macro Sampling

DenisZ
11 - Bolide

Hi, 

 

I am trying to make a sampling iterative macro, however it appears that it is not working properly (or at all really). 

 

Basically, I have some rows with revenue and cumulative revenue. Then based on some generated rows, I would want to output the first cumulative sum number after the generated numbers which should iterate (hopefully). Iterations should stop when the iteration reaches the last row, currently it is just a hardcoded number, but I would like it dynamic - havent figured out how to do that yet either.

 

I guess the main issue here is that im not able to pass the data from the generated rows over to the filter tool which currently is a mess. 

 

I have provided a minimum viable program to illustrate this.  

 

Hope some of you can push me in the right direction or point out what I have misunderstood. 

 

(I have solved this without macros, but im trying to do it with macro)

 

Thanks in advance! 

5 REPLIES 5
mceleavey
17 - Castor
17 - Castor

Hi @DenisZ ,

 

ok, so yes this is a bit messy. You have a dropdown in there selecting which field you want, but there is only one, and I'm not sure what you're trying to achieve.

 

I'm happy to jump on a call if you're free?

 

M.



Bulien

Christina_H
14 - Magnetar

There are three changes I would make.

1. Use a summarize tool to find the maximum RecordID.  Append this before your filter to get rid of the hard coded final iteration number.

2. Append the value from the generated row before the filter rather than trying to pass it directly into the filter.

3. I don't know what exactly you're aiming for so I might be wrong about this one, but you're only passing a single row to the next iteration.  I would guess you want all the rows for every iteration?  You need to take the data from earlier in the process.

DenisZ
11 - Bolide

Hi @mceleavey Yea, I was trying to see how I could change the formula. Basically, each iteration I want a new row from the generated rows tool. There is probably a better way to implement it....

mceleavey
17 - Castor
17 - Castor

@DenisZ ,

 

that doesn't really help!

You can't use a dropdown in an iteration, without it being the same through all iterations. You can't select a value in a column in an iteration because that value doesn't exist yet, so you are literally just selecting a column.

I'm not even sure why you're iterating.

 

Are you simply trying to generate the rows then create all possible combinations?

 

We need more information about what you're trying to do.

I'm free for the next 30 minutes if you want to jump on a call. DM me if so and I'll send you an invite.

 

M.



Bulien

mceleavey
17 - Castor
17 - Castor

Hi @DenisZ ,

 

Thanks for jumping on the call, and glad I could help.

I'll post the workflow here as well.

 

M.



Bulien

Labels