Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Macro that allows me to select a field and run a Groupby/Count on that field - Help.

jdelaguila
8 - Asteroid

Hi Everyone!

 

I'm trying to build a Macro that looks at my file, allows me to choose a field via a Drop Down Menu and then runs a simple GroupBy / Count on that Field. 

 

Ideally the macro would allow me to choose multiple fields and then run a GroupBy / Count on each field, but i'm not sure if that is possible. 

 

I attached my Alteryx Workflow along with my failed attempt of a macro. 

 

Any help would be greatly appreciated! Thanks.

 

Javier

5 REPLIES 5
apathetichell
18 - Pollux

Hey Javier,

 

Just to be clear - a dropdown or listbox for multiple selections in a macro will be set by someone using the workflow - a dropdown in an app can be set by a user... which one would you prefer?

 

Also - how do you want the final output? Like rejoined based upon a unique id which is always with the data or just floating? Like imagine you've got two columns selected and count/grouped on - what do you want your output to look like?

 

Attached is the most basic version (as an app)

jdelaguila
8 - Asteroid

I guess a listbox makes more sense - as i would be able to choose what fields i wanted to process. 

 

The output i was thinking an excel file would be nice.  

 

So if i chose one field - GENDER for example the output would look like this:

 

GENDER     COUNT

F                  102

M                  98

U                  14

 

Thanks for the help!

apathetichell
18 - Pollux

Did you check out the app I posted?

jdelaguila
8 - Asteroid

@apathetichell  - I've never used an App before but this is exactly what i was trying to build.

 

Ideally i would like to be able to point this to a file of mine - how would i edit the app to do this? 

 

I may have to start learning how to build and edit Apps now. Thanks!

 

Javier

apathetichell
18 - Pollux

Fun! Glad it worked!

 

For new data - put an input data tool on the canvas and point that to your dropdown and to you transpose (ie the exact same connections where the text input are) - everything else should be the same. run it once before hitting the wand...

 

to output hook an output tool and give it a name/location or use table/render etc...

Labels