Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

Alteryx Designer Desktop Discussions

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

Repetitive tasks after splitting the data into samples

RRW
7 - Meteor

Hi community, 

 

I am looking for a smart way to solve the following issue:

 

Input data has a few fields whereas the first one contains a sample ID and the other fields contain numeric values for further calculations. 

Each sample ID has multiple rows (can be 1 row, but can also be 10 rows with the same sample ID).

 

Like this:

 

Sample ID - Number1 - Number2 - Number3

1                     45.5         20.3             33.4

1                     50.3            ...                ....

2                       ...              ...

3

3

3

4

4

 

I do have a macro which does some complex data crunching with each sample set.

I have to split the data for that. That means I will filter for sampleID = 1 and use the macro. Then I will do the same with filter Sample ID = 2 and so on. At the end I will join all datasets together again.It is not possible to use the macro for the unfiltered data. Only one sample set can be processed at the same time.I have about 500 samples in total and I do not like to use 500 filter tools :) So I will need to find a way to 

 

1. split the data according to the sample IDs

2. use the macro for each sample ID

3. join all outputs together

 

I was wondering if this can be achieved with a batch? Any ideas?

 

1 REPLY 1
ChrisTX
16 - Nebula
16 - Nebula

Create a list of unique Sample IDs.  Feed the list into the Macro input anchor, the upside down question mark.

 

In the macro configuration, select your Sample ID field in the drop-down for "Control GroupBy Field".

 

Screenshot 2024-06-12 100016.png

 

 

The workflow will essentially perform a Join for each unique Sample Id, to filter the data rows being fed into the macro. 

 

That's how a batch macro works, when you use the GroupBy functionality.  

 

Check out some of the training videos for Batch Macros:  Videos - Alteryx Community

 

Chris

 

 

Labels
Top Solution Authors