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.
SOLVED

Batch Macro with Multiple Control Parameters

JordanJ
7 - Meteor

Hey everyone,

 

I've got some policy data that I'm trying to apply various multipliers to, but I want to apply each multiplier based on an individual's risk class and issue year with the use of batch macros. I got this to work when using one control parameter on a separate multiplier, but it's throwing me for a loop when I try to add additional control parameters. For some reason the total number of records is getting multiplied.

 

An example of what I want is if risk class is 1 and issue year is 2005, then the "UW Class Multiplier" I want applied is 0.65, and if risk class is 1 and issue year is 2007, then the "UW Class Multiplier" I wanted applied is 0.60.

 

Could someone please explain what I'm doing wrong?

 

Thanks!

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

I may not understand this problem, but why couldn't this be done with a Join rather than a Batch macro?

 

Also, when it comes to batch macros and multiple grouping sets, I typically recommend concatenating these different group fields into one control parameter. The values/groups can be parsed out inside the batch if necessary. 

fmvizcaino
17 - Castor
17 - Castor

Hi @JordanJ ,

 

You had two problems in your workflow and macro. The first one is exactly what @CharlieS just said about the control parameter group fields, the second one is in your action tool for issue year where you are replacing the wrong string (I believe when you start testing, you missed the change you made).

 

Let me know if that works for you.

 

Best,

Fernando V.

 

 

JordanJ
7 - Meteor

Excellent point, @CharlieS! I just learned about batch macros, so I guess I was so focused on using them in my workflows that I forgot about just using a simple join. That's a bit of a 'face palm' moment. Thanks for the help, everyone!

CharlieS
17 - Castor
17 - Castor

@JordanJ wrote:

Excellent point, @CharlieS! I just learned about batch macros, so I guess I was so focused on using them in my workflows that I forgot about just using a simple join. That's a bit of a 'face palm' moment. Thanks for the help, everyone!


Good on you for pushing into new material. Keep up the learning!

Labels