Alteryx designer Discussions

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

layered SUMMARIZE

Highlighted
Asteroid

i have files with 106 fields, all numeric.  i want to report the MIN, MAX and AVG for each field, in 3 rows.  if it do this in one summarize, i get 106*3 fields, instead of 106 fields with 3 rows.  is it possible to "layer" row 1 to be the MIN, for each field. row 2 to be the MAX, and row 3 to be the AVG, for each field?  thanks

 

becki kain

 

Highlighted
Alteryx Partner

Many ways I'm sure...first that comes to mind for me would be:

 

1. run the data to three separate summarize tools (one for each agg function)

2. add a column to each with the summarize type ("MIN","MAX" or "AVG")

3. use dynamic rename tool to change all the summarized column names back to the originals using the "Take Field Names from Right Input Rows" option.  (you could hand rename all 106 in the summarize tool 3 times, but who would want to do that?)  https://help.alteryx.com/11.3/index.htm#cshid=DynamicRename.htm

4. union the outputs

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

I would probably propose something a bit different.

 

I would use the field summary tool to bring together your aggregates (this automatically pulls through min, maxes and averages for your selected fields, among other metrics you may be interested in).

 

4.png

 

1.png

 

You can then pivot your data, so you get a line for each measure and metric.

 

2.png

 

Before finally cross-tabbing into your desired state.

 

3.png

 

I've attached the workflow shown in the example.

 

Ben

Highlighted
Asteroid

thanks.  I had thought about that idea, but with a select, not dynamic rename but I was stuck on the union part.  :-)

Highlighted
Asteroid

union or join, the outputs?

Highlighted
Asteroid

union was the way to go, thanks!

Highlighted
Alteryx Partner

If you're asking about the method I suggested, union.

That's why you want all the columns to be named identically after the summarize so you can "stack" the values in the output as desired.

Highlighted
Alteryx Partner

Nice solution Ben!

Labels