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.

Help running iterative process through data table

cpease
5 - Atom

Hello,

 

I am fairly new to Alteryx and I am looking to build a workflow that will work through a table of data and run a process based on a state parameter. In this example, I am looking to call out the highest variances by state (3 records per state). However, the states in the data table will be different based on parameters that are passed earlier in the workflow.

 

StateCompany NameVariance

NY

A$1000
NYB$500
NYC$200
NJD$20000
NJE$1000
NYF$100
CAG$10000

 

 

Appreciate the help!

2 REPLIES 2
griffinwelsh
12 - Quasar

See the attached workflow for a solution. This is a usecase for group by rather than a batch macro. 

SPetrie
13 - Pulsar

If that is what your input looks like, I think a macro is a bit overkill.

One option, If your variances are Numeric, you can sort them descending and then use a sample tool grouped by state to take the first 3.

sample.PNG

Labels