Data Aggregation – Sum, Average, Count, Min and Max

If you have a data set that you would like to summarise in a certain way, ORQA has the Get Summary Statistics operation that can enable you to achieve this. As an example, I have the following file that stores sales made by Employees within a company:

Employee,Sale_$,Department
Anna,399,Kitchen
Anna,200,Kitchen
Anna,450,Lounge
Dave,20,Kitchen
Dave,199,Kitchen
Sophie,1000,Kitchen
Sophie,400,Kitchen
Joe,20,Lounge
Joe,499,Lounge

Once I have read this Excel file into a data table, using the Read from Excel File operation, I want to find total amount of sales made by each employee as well as the average sale amount, number of sales they have made, smallest and largest sale amount. To do this I have used the Get Summary Statistics operation and specified the following properties:

Summarise Columns: SUM(Sale_$) as Total Amount, AVG(Sale_$) as Average, COUNT(Sale_$) as Count, MIN(Sale_$) as Smallest, MAX(Sale_$) as Largest
Group By Columns: Employees

This will produce an output table in the following format:

Notice how the data set has been reduced to one record per Employee, this is because we have grouped the set using the value in the Employee column and aggregated the amounts in the Sale_$ column.

1 Like