Group data

Completed

Grouping and summarizing data

Categorical data within a dataset can be grouped into sub categories before applying an aggregate function. For example, in a sales order table with a retail store column, you can group the data by geographical location, and then summarize the revenue across each store to create categorized totals.

When the dataset contains multiple categories, you can group them into hierarchies, creating multilevel sub totals. After grouping sales data by geographical location, you could then summarize against another level, such as the day of the week. This helps you delve deeper into your data to uncover more detailed insights.

By grouping and summarizing sales data, you might find that the New York store generates more revenue than the London store, but that the London store sells more products on a Saturday.

In this video, you'll see how grouping can be applied to categorical data to create a summary within each category: