Open In App

How to Group or Ungroup Data in a PivotTable

Last Updated: 06 Dec, 2023

I

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Pivot Table Grouping is a feature that enables us to organize data into specific categories or ranges. It allows you to group data based on various factors, such as dates, numbers, or custom-defined intervals, making it easier to analyze and draw insights from the data. We will explore Pivot table grouping and how it can help you gain deeper insights and make informed decisions from your data.

What are Pivot Tables

A Pivot Table is a data processing tool used in spreadsheet software like Microsoft Excel, Google Sheets, or other data analysis tools. It allows the creation of a summary of large datasets by grouping, aggregating, and analyzing data dynamically. Pivot tables are mainly helpful when dealing with huge amounts of data, as they simplify the process of generating meaningful reports without the need for complex formulas or programming.

What is Grouping Data in the Pivot Table

Grouping data in Pivot Table refers to a powerful data organization feature in Excel, allowing users to effortlessly categorize information based on various criteria such as dates, numbers, and text fields. For instance, you can group order dates by year and month or create convenient score bands when working with test results, facilitating more in-depth performance analysis. The process of pivot table grouping is user-friendly and intuitive, involving the manual selection of specific text items within a pivot table field and then grouping these chosen items to promptly generate subtotals for a particular subset of data in your pivot table. This functionality proves invaluable when focusing on specific categories within your dataset, enhancing the precision and efficiency of data analysis.

Types Of Grouping Pivot Table Data in Excel

In the Pivot data table, data can be grouped based on Dates, Numbers, and Text values

  • Grouping by Date: We can group dates by months or years, months by years, etc. 
  • Grouping by Numbers: We can group numbers in a particular range band together. 
  • Grouping by Text: For text values, we need to group manually, otherwise, it will throw an error. 

Automatic Date Grouping in Excel

Automatic date grouping is a convenient and time-saving feature that is available in Excel 2016 and later versions when working with Pivot tables. When you add a date field to a Pivot table, Excel automatically groups the dates based on the selected time period, such as by year, month, or quarter. This makes it easier to analyze and summarize time-based data effectively.

You can turn off this feature in the latest versions of Excel. This is an application-level setting, and will affect all your Excel workbooks.

Note: In Excel 2019 and Excel 365, you have the ability to modify an Excel Option setting that allows you to enable or disable the date grouping feature.

How to Turn Off Automatic Date Grouping

Follow the below steps to turn off the automatic date grouping feature:

Step 1: Click on the File Tab in the Ribbon, and then click on Options.

Step 2: Click the Data category displayed at the left.

Step 3: At the end of the Data options sections, add a checkmark to “Disable Automatic grouping of date/time columns in Pivot tables”

Step 4: Click OK to apply the new settings.

How to Undo the Date Grouping

To undo the data grouping for all Excel 2016 and later, you need to manually ungroup the dates with the below method:

Keyboard Shortcut

Follow the given steps to undo the date grouping through the Keyboard shortcut.

Step 1: Add the Date field to the Pivot table.

Step 2: Then press Ctrl+ Z, to undo the automatic date grouping.

Step 3: The grouped fields are removed, and the original Date field remains in the Pivot table.

Ungroup Command

Follow the below steps to Undo the Date Grouping by Ungroup Command

Step 1: Add the Date field to the Pivot Table

Step 2: At any time, right-click on any of the date field items or headings.

Step 3: In the right-click menu, click Ungroup

Step 4: The grouped Fields are removed, and the original date field remains in the Pivot table.

How to Group Dates in Pivot Tables in Excel By Month and Year

Step 1: Create a Pivot Table

Pivot Table

Pivot Table

Step 2: Right-Click a value and select a group.

Select group

Select Group

Step 3: Select the Time Period Days and Months and Click Ok

Select time period

Select time period

Step 4: Preview Pivor Data

The Pivot data table is grouped based on Month and Date.

Pivot data table is grouped based on Month and Date

How to Group Dates in Pivot Tables in Excel by Week

By following the procedures listed below, you can arrange the entries in a Date field by week

Step 1: Use the Right-click on Dates in Pivot Table

Step 2: Select Group from the Pop-Up Menu

Step 3: Select Days from the ‘By’ list

Step 4: Select 7 in Number of Days

Step 5: Adjust week Range if Required

Step 6: Click OK

Group Dates by Week

Group Dates by Week

How to Remove Extra Items in Grouping Dates

When you group a date field in an Excel Pivot table, you may notice that new items are added, for all the dates before the start date and after the end date. These extra items are denoted with “<” or”>” symbols, such as “<15/05/2023” and “>12/12/2023,” and are based on the first and last dates in the source data.

You can not directly remove these extra items from the Pivot table. However, there are alternative approaches to address this issue:

Customize Captions

Although you cannot remove the extra items, you can modify their captions to replace the text with space or more suitable descriptions. This way, you can minimize the visual impact of the extra items in your Pivot table report.

Utilize Additional Fields

An effective workaround is to create new fields in the source data to calculate the year and year/month for each date. This approach can help you to avoid the display of extra items while still gaining valuable insights from your data.

Note: In Excel 2013, you can use the Timeline Filter, to quickly filter by year, quarter, month, or day.

Grouping Numbers

Number Grouping in Pivot tables is a powerful feature that helps you to create a more concise and organized summary of numerical data. Instead of listing numbers individually in a row field, you have the option to group them together based on specific intervals or ranges, making it easier to analyze the data.

Follow the below steps, to group data by numbers:

Step 1: Create a Pivot Table

Pivot Table

Step 2: Right-click on a cell and select the group

Select group

Step 3: In the dialogue box, under by select the interval of groups

Grouping

Step 4: Click OK, pivot table data is grouped in intervals of 5

Result

How to Group Text Items in Pivot Table

It is not possible to group text data using the above method in Excel. It will throw an error if we try to do so. So, we have to select data manually that we want to group, and then group it. 

Step 1: Create a Pivot Table.

Pivot Table

Step 2: Select the Data Manually

Selecting data manually

Step 3: Right Click on Data and Select Group

group option

Step 4: Preview the selected data will be vivble under Group 1

Grouped data

Step 5: Rename the Group 1

Renaming the group

How To Rename the Group in Pivot Table

You can also rename the group according to you. Follow the below steps to rename the Group

Step 1: Click the Group Heading

Step 2: Edit and Type a new Name

How To Add More Items to a Group in Pivot Table

This is a useful feature when you need to add some data after grouping. Follow the below steps:

Step 1: Select All Data in the Group

Step 2: Press Ctrl Key and Select data to be added in the Group

Step 3: Right-click on the selected data and Select Group

How to Ungroup Text Items in Pivot Table

After manually grouping the text items in a Pivot field, there might be instances where you need to ungroup certain data or all of them. Excel provides easy methods to accomplish both tasks efficiently.

How to Ungroup a Single Group

Step 1: Right-click on any item within the desired group.

Step 2: Click on “Ungroup”

How to Ungroup All Groups in Pivot Table

Step 1: Click the Group Heading

Step 2: Right-click on any items within the Selected groups.

Step 3: Click on “Ungroup”

FAQs

How do I delete unwanted data from a pivot table?

To remove undesired data from a pivot table, initiate the process by right-clicking on any cell within the pivot table. Next, navigate to the PivotTable options and access the Data tab within the PivotTable Options dialog box. Within the Retain Items section, opt for ‘None’ from the available dropdown list.

How do I remove items from a pivot table without values?

  1. Click the arrow to the right of a row or column heading in the pivot table.
  2. Click to uncheck the (blank) check box.
  3. Click OK.

What is the shortcut for group and ungroup in Excel?

In Excel Shift + Alt + Right Arrow, you can quickly group rows in Excel, and the shortcut key Shift + Alt + Left Arrow can be used to ungroup rows.



I

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

I

How to Group and Ungroup Pivot Chart Data Items in Excel?

A pivot chart is the visual representation of a pivot table in Excel. Pivot charts and pivot tables are connected with each other. Pivot chart are much more flexible than normal chart because Pivot Chart is linked to a PivotTable. Filters, sorts, and data rearrangements applied to Pivot Table are reflected on the chart. Steps to create Pivot chart : Follow the below steps to create a Pivot chart: Select the table to create the pivot chart.Inside Insert tab, click Pivot chart.A dialog box will appear, select the table and the cell where you want the table and chart.Both Pivot chart and Table will be created, but no field is selected.Select the fields, you want in the chart.Chart will be formed.To Group data in the Chart: Follow the below steps to group data in the Chart: Select the rows or columns from the table, you want to group.Right-click and press group.The data will be grouped and the chart will show those rows together along with the Group name.To Ungroup data in the Chart : Follow the below steps to ungroup data in the chart: Select the group name.Right-click and press Ungroup.The data items in both the table and chart will be ungrouped.
Read More

How to Create a Power PivotTable in Excel?

article_img
When we have to compare the data (such as name/product/items, etc.) between any of the columns in excel then we can easily do with the help of Pivot table and pivot charts. But it fails when it comes to comparing those data which are in two different datasets, at that time Power Pivot comes into role. So, Basically, Power Pivot is useful for comparisons of those data which are in two or more different datasets. Power pivot is useful to perform strong data analysis and create data models also. The main use of this is to mash up a large volume of data from different insights and perform different types of analysis very quickly. Example: For more clarification, let's understand with one example, Step 1: First, take any data sets in which you want to compare those data which are in different datasets. Let's say here, we are taking three different datasets Orders, products, and returns. and our aim is to find the total sum of sales in each region. Dataset 1: Here we are taking the first dataset of name order. Dataset 2: Here we are taking the second dataset of name Product. Dataset 3: Here we are taking the third dataset of name Return. Convert the whole data into table form (Firs
Read More

How to Ungroup Columns in Excel: A Complete Guide

article_img
Have you ever worked with grouped columns in Excel and needed to break them apart to simplify your view? Ungrouping columns in Excel helps you manage and view your data more efficiently, especially when working with grouped or hierarchical structures. This guide will show you step-by-step methods on how to ungroup in Excel, including manual techniques, keyboard shortcuts, and ways to ungroup all columns at once. Whether you're dealing with intricate data sets or just looking to tidy up your worksheet, these tips will make your Excel data management easier and more effective.How to Ungroup Columns in ExcelTable of ContentWhy Ungroup Columns in ExcelHow to Ungroup Columns in ExcelMethod 1: Manually Ungroup ColumnsMethod 2: Use Keyboard Shortcuts to Ungroup ColumnsMethod 3: Ungroup All Columns at Once Tips for Ungrouping Columns in ExcelCommon Issues When Ungrouping ColumnsWhy Ungroup Columns in ExcelUngrouping columns in Excel is helpful for various reasons:Editing Data: Access and modify data that was hidden by grouping.Clear Layout: Remove unnecessary groupings to make your spreadsheet more readable.Reorganizing Data: Ungroup to reorganize columns or apply new groupings as needed.E
Read More

Applications of Group Theory

Group theory is the branch of mathematics that includes the study of elements in a group. Group is the fundamental concept of algebraic structure like other algebraic structures like rings and fields. Group: A non-empty set G with * as operation, (G, *) is called a group if it follows the closure, associativity, identity, and inverse properties. Properties of GroupIf * is an operation and G is a group then, properties of group theory: Closure: If 'a' and 'b' are elements in group G then, a*b also belongs to group G.Associativity: If 'a', 'b' and 'c' are elements in group G then, a*(b* c) = (a*b) *c Identity Element: For every element 'a' in the group there exists an identity element e such that e*a = a*e = aInverse: For all element 'a' belongs to group G there exists a-1 such that a*a-1 = a-1*a = eNote: A non-empty set S is called a semi-group if it follows closure and associativity properties.A non-empty set S is called a monoid if it follows closure, associativity, and identity element properties.A non-empty set S is called an abelian group if it is a group and follows commutative property i.e., if a and b are elements of group G then, a*b = b*aTypes of GroupsSome classes of gr
Read More

How to Create Group on Instagram?

article_img
Instagram is one of the most popular social media applications in the world today. It has over 2.3 billion active monthly users worldwide as of March 2023. It is an application that’s used across the world for one or the other reasons. Earlier Instagram was just another social media app to connect with known and unknown people but over the past few years, it has become one of the top platforms that brands and businesses use for marketing and sales to grow their business. Instagram has become everyone’s favorite app all thanks to its comfortable interface. We get to see all new exciting features to try and it just keeps getting more and more amusing and explore-worthy! But there are times when we struggle to find even the easiest things difficult or say we’re unable to find something even though it’s right in front of our eyes! We said this because although the app is very straightforward and painless to use, often users struggle to figure out how to create a group on Instagram, probably because there’s no visible option that says “create a group”! If you’re looking for solutions on how to create an Instagram group on your Android phone or iPhone, we’re here to help you out! How t
Read More

How to Select the First Row of Each GROUP BY in SQL?

article_img
Selecting the first row of each group in SQL is a common requirement in database queries, especially when working with grouped data. SQL GROUP BY queries are highly effective for organizing data into logical groups, and additional techniques like window functions help to isolate the first row from each groupIn this article, we will explore multiple methods to efficiently select the first row of each group in SQL, providing comprehensive insights through syntax, examples, and outputs. By the end of this article, we will have a clear understanding of how to use GROUP BY with aggregate functions.Selecting the First Row of Each Group in SQLThe GROUP BY statement in SQL is used to group rows based on the values in one or more columns. To fetch only the first row from each group, additional techniques like aggregate functions (e.g., MIN(), MAX()) or window functions (e.g., ROW_NUMBER()) are often used. Let’s explore these methods in detail. SyntaxSELECT * FROM yourTable WHERE columnName = (SELECT MIN(columnName) FROM yourTable GROUP BY groupColumnName)This query selects all rows from ‘ yourTable ‘ where the value in ‘ columnName ‘ is equal to the minimum value of ‘ columnName ‘ in each g
Read More

How to Create a Group Chat on Instagram?

article_img
You might have used Instagram on your smartphone in the past or still do so, isn’t it? If you do, you might have come across direct messaging to friends, since it is a very exciting feature to behold. Despite these upsides, Instagram has a gray region where you cannot send a single post to multiple friends directly via Instagram. This is where IG Group chat has come to your rescue. In this blog, we shall look at how it is solving Instagrammer's messaging woes. How to make a group on Instagram? Read on to get the answer. Introduction to Instagram Group Chat Social Media Platforms have simplified how we connect and share ideas with friends, family, and community. Instagram is the best example in this category where not only do you make reels but also could direct message peers. This photo/video-sharing app is an extremely versatile marketing tool for businesses and a highly engaging social media platform for the general public. However, today Instagram is no longer a photo/video-sharing platform. With the launch of some new features, like „Group Chat“, the social media brand has upgraded its definition. Group chat is one of the convenient tools added by the globally popular photo a
Read More

How to Create a Group in Gmail: A Step-by-Step Guide

article_img
Managing your email can be a daunting task, especially when you need to send messages to the same group of people repeatedly. Imagine the time wasted typing each email address over and over again. Fortunately, Gmail offers a streamlined solution: creating contact groups. With this handy feature, you can easily compile a list of contacts and send emails to the entire group with just a few clicks.Whether you’re coordinating with a team, organizing a club, or planning an event, our step-by-step guide will show you how to create and manage groups in Gmail. Get ready to simplify your email communication, boost your productivity, and become a Gmail pro! Learn how to set up Gmail contact groups, send group emails, and enhance your Gmail experience with our comprehensive tutorial. How to Create a Group in GmailCommunicating with a large group of people can be time-consuming, especially if you have to type out every email address each time. Gmail Labels, or Contact Groups, offer a simple solution for streamlining group emails.In this article you will learn creating and managing email groups in Gmail for both desktop and mobile users.Table of ContentHow to Create a Group in GmailHow to Send
Read More

How to Group Columns in Excel: Ultimate Guide

article_img
Ever stared at a cluttered Excel sheet and wished you could hide the noise to focus on what matters? Imagine collapsing entire data sections with a single click—no more scrolling through endless columns to find the numbers you need. Excel’s Group Columns feature does exactly that, turning overwhelming spreadsheets into organized, user-friendly dashboards.This ultimate guide will teach you how to group columns in Excel quickly and efficiently. Whether you’re analyzing budgets, tracking projects, or managing inventory, grouping columns helps you simplify complex data. We’ll cover everything from basic grouping steps to advanced tricks, including how to use outlines, data sections, and the Group tool under the Data Tab.How to Group Columns in ExcelWhat is Grouping in ExcelGrouping is a feature in Excel that lets you combine adjacent columns into a single group, which you can collapse or expand as needed. This functionality is especially useful when working with complex spreadsheets with multiple data categories or calculations.Why Group Columns in ExcelImproved Readability: Simplify large datasets by focusing only on relevant information.Better Organization: Group similar or related d
Read More

How to Create a Group Email in Outlook: Step by Step Guide

article_img
How to Create a Distribution List in Outlook: Quick StepsOpen Outlook >> Go to People/ ContactsClick on New Contact GroupName the Group >> Add MembersSave the List Use the List Want to send emails to multiple people without typing each address manually? Creating an Outlook email group (also known as a contact group or distribution list) allows you to send emails to multiple recipients at once, saving you time and effort. Whether you're coordinating with a team, organizing an event, or staying connected with friends & family, Outlook email groups make communication seamless.In this guide, we’ll show you how to create a group email in Outlook across Windows, Mac, and Web versions, plus how to edit, delete, and send mass emails using contact groups.Create a Group Email in OutlookTable of ContentWhat is an Outlook Email GroupHow to Create a Group Email in Outlook for WindowsHow to Create a Contact Group in Outlook for MacHow to Create a Group Email in Outlook Web (Office 365)What is an Outlook Email GroupAn Outlook Email Group (or Contact Group) allows you to group multiple email addresses under one name, making it easier to send emails to multiple recipients at once. I
Read More
three90RightbarBannerImg