Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Aggregation Challenge

IgalG
5 - Atom

Hi All,

 

I am relatively new in Alteryx and I am stuck with an aggregation. I hope somebody can help...

 

Just to simplify the issue at hand, I need to aggregate a data set in such a way that it will provide all possible combinations based on selected demographic columns. The problem is that the number of aggregation columns may change and a solution should be dynamic enough to be adjusted future changes. 

I hope there is an easy way to solve. The problem that I face, when I try to append the data it only provides combination of all sources. However this is not all universe. 

 

In the below example, Region to Customer columns needs to be aggregated with sum of cost. When I use Append tool, it gives combination of all 6 columns , however I need aggregation for a column, all 2 columns combinations, all 3 columns combinations etc; e.g.:  by Region, then Country, then Region & Country and so on in the same table.

I can build tens of Append to solve it, but still the columns and number of columns may change and it is not a sustainable solution. 

 

Aggregation.JPG

 

Thanks in advance

Igal

4 REPLIES 4
danilang
19 - Altair
19 - Altair

Hi @IgalG 

 

Can you post your sample data in a form that we can use, i.e. csv, .yxdb, in a table on the post itself, etc?  You'll be more likely to get a solution if we don't have to type in lots of data.

 

Dan

IgalG
5 - Atom

Hi @danilang,

Thanks for the tip, I added a source excel and some simulated outcome (it takes too long in excel) into the original post.

 

Best

Igal

 

OllieClarke
15 - Aurora
15 - Aurora

Hi @IgalG here's what I came up with

OllieClarke_0-1573821425179.png

It's not perfect as there is a summarise tool at the end, which won't update if new columns are added, but as long as the columns stay the same, the workflow does what you want. Maybe @danilang can come up with something truly dynamic...

 

OllieClarke_0-1573821700606.png

 

IgalG
5 - Atom

Hi Ollie,

 

This is already quite good. Thanks for your help!

 

Lets wait a bit more if somebody or @danilang  can come up with a fully automated solution before calling this as a solution.

 

best

Igal

 

Labels