community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

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

Highlighted
Meteor

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,

TSP 

 

 

Alteryx Alumni (Retired)

[test comment]

Bolide

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

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Unknown-Select-Feature-w-Summarize-Too...

 

see the workflow 20181113-DynamicSummarize.yxzp from Charlie S

 

Also see this related post, using a RecordID field:

 

   https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Adding-up-columns-for-sum/m-p/381053#M...

Labels