Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More

Dynamically group by all string fields and sum by number fields


I have a data source which contains [Year], [Month], [State], [City], [Store] and [Budget]

To produce an annual report I need I group by [Year], [State], [City] and [Store], and I sum the [Budget_$] field.

This allows me to compare to historic records.


Sometimes I am sent data also containing for example [Sales Assistant] and [Actual_$].

When I get these fields I need to contain them in the report. 

Im trying to create a macro that can dynamically group by all incoming string (& bool) fields, and sum by all numeric fields (currently a mixture of double and fixed decimal). 

Put another way I’m trying to remove all duplicates in the key fields (needs to be dynamic) as it is affecting a downstream join tool. 

Ideally it would be a macro containing just the one input and one output much like a summarise tool. 

Many thanks,




Alteryx Alumni (Retired)

[test comment]


This post might have exactly what you're looking for:


see the workflow 20181113-DynamicSummarize.yxzp from Charlie S


Also see this related post, using a RecordID field: