In this blog I'm going to take you through the basic methods for aggregation in Alteryx using the Summarize tool.
To aggregate is to take data from multiple sources and summarize it in some way, whether that be calculating the total or finding out an average.
![](https://www.thedataschool.co.uk/content/images/2022/11/Screenshot-2022-11-11-164457.png)
For this example I've made a very simple data set relating to sales of various items of stationary/electronics/furniture across a number of stores in an imaginary business. It's generally wise to start with a data cleaning step using the select tool in Alteryx just to make sure that all of the fields are using the correct data type before going into the summarize tool.
![](https://www.thedataschool.co.uk/content/images/2022/11/select-small.png)
![](https://www.thedataschool.co.uk/content/images/2022/11/Screenshot-2022-11-11-164806.png)
The most important thing is to ensure that numerical values that will be used for calculations are listed as a numerical type and not a string. A double is a type of numerical value and in this case, all of the numerical fields are connected as doubles. It is now time to open the Summarize tool.
![](https://www.thedataschool.co.uk/content/images/2022/11/summarize-small.png)
The first actions we're going to look at are the basic Sum, Average & Count capabilities of the Summarize tool
The Sum action:
![](https://www.thedataschool.co.uk/content/images/2022/11/SUM.png)
The Sum action adds together all of the values from within the field you have selected, in this case I have selected Total Sale Value which, when summed, will give me the total value of all the sales in the database.
![](https://www.thedataschool.co.uk/content/images/2022/11/SUM-RESULT-2.png)
If you do the same thing but with the Average you will get the average of all sales but if you select Count you will just see the total number of records within in that field rather than the result of any calculations.
The next interesting action to look at is the Group By action which, when used in conjunction with Sum, Avg & Count tools can separate the results of those calculations into sub-groups from the data set.
For example:
![](https://www.thedataschool.co.uk/content/images/2022/11/GROUP-BY.png)
If you use the Group By action in conjunction with the Sum action and run the sequence you should see a table showing the total sales broken down into their respective store locations.
![](https://www.thedataschool.co.uk/content/images/2022/11/LOCATIONS.png)
The Summarize tool has far more actions beyond this but these are just the most common, basic actions you're most likely to encounter when using Alteryx.
I hope this blog was helpful!