How to Flatten Data in Excel Pivot Table?
Last Updated :
27 Jun, 2024
Flattening a pivot table in Excel can make data analysis and extraction much easier. In order to make the format more usable, it’s possible to “flatten” the pivot table in Excel.
To do this, click anyplace on the turn table to actuate the PivotTable Tools menu. Click Design, then Report Layout, and then, at that point, Show in Tabular Form. This will isolate the line names and make it simpler to investigate information.
What Does Flattening Mean in Excel?
Flattening a pivot table in Excel refers to transforming the data from a pivot table format, which can be complex and hierarchical, into a simple tabular format. This process separates row labels and creates a structure that is easier to work with for further analysis or export to data warehouses.
Flatten is a table function that takes a VARIANT, OBJECT, or ARRAY column and produces a lateral view (for example an inline view that contains a relationship alluding to different tables that go before it in the FROM clause). FLATTEN can convert semi-structured data to a relational representation.
Benefits of Flattening Data in Excel
- Improved Data Analysis: Flattened data is easier to analyze, as all relevant information is available in a tabular format.
- Enhanced Data Extraction: Flattened data can be more easily extracted and imported into other systems or data warehouses.
- Simplified Reporting: Creating reports becomes more straightforward with data in a flat format.
How do you use flatten in Excel?
Excel has a capability called =FLATTEN(), which changes over a reach, or different reaches, into a solitary section. For example, if the following table was in A1:C3…
If you entered =UNIQUE(A1:C3) in A5, you would get the following dynamic range output,
Given this is a dynamic range output, it can then be used in things like UNIQUE, FILTER, SORT, and so on, or referred to in one more regular formula as A5#.
How to Flatten a Pivot Table in Excel
This is another trick gleaned from investigating information to be imported to a Data Warehouse from an Excel bookkeeping sheet. In some cases, we are given information in a pivot table, which is not the most useful format for exploration or extraction, particularly because all the row labels are in the same column by default.
In order to make the format more usable, it’s possible to “flatten” the pivot table in Excel. To do this, click anyplace on the pivot table to activate the PivotTable Tools menu. Click Design, then Report Layout & then Show in Tabular Form.

Excel Pivot Table
This will separate out the row labels & make it simpler to explore data.

Pivot Table
How to Flatten, Repeat, and Fill Labels Down in Excel
Many of Excel’s features, like PivotTables, Charting, AutoFilter, and the Subtotal highlight, were intended to work with level information. Level information is depicted as information that holds values in all cells inside the table.
Everything data about the record is gotten from the qualities in the line, and, not from its situation inside the table. It is easy to outwardly see the distinction. Along these lines, this screen capture shows information that is not flat,
You can see labels are not repeated, and there are cells with missing values. Hence, we should decide on data about a record in view of the place of the line inside the table.
For instance, we know that line 39 is for Bayshore Water, at the same time, we just realize that column 40 is for Bayshore Water in view of its situation inside the table. In contrast, flat data contains repeated labels as needed. This screenshot shows flat data,
Summary
- Select a range that you want to flatten – typically, a column of labels.
- Highlight the empty cells only – hit F5 (GoTo) and select Special > Blanks.
- Type equals (=) and then the Up Arrow to enter a formula with a direct cell reference to the first data label.
- Instead of hitting enter, hold down Control and hit Enter.
- To replace the formulas with values, select the entire column, and then Copy/Paste Special > Values
Step 1: First, select the range that you’d like to flatten. This is typically a column of labels you want to repeat, represented by B39:B62 as shown image,
Step 2: Next, we want to select only the empty cells within the range. We can simply use the Go To order for this.
Hit the F5 key on your keyboard to bring up the Go To dialog, as shown image
Then, hit the Special button to raise the Go To Special dialog as shown in the image,
Click OK, and Excel will select only the empty/blank cells within the original range, as shown in the image,
Step 3: Now, we need to write a formula that pulls the value from the cell above. This is easily accomplished by typing an equivalent sign (=) and then hitting the Up Arrow key on your keyboard. There are alternate ways, however, to me, this is the simplest method for writing the formula. Now, resist the urge to hit the Enter key. Do Not hit Enter yet. The resulting formula is shown in the image,
Step 4: Now, we need to fill this formula down through all selected (black) cells. This is finished by holding down the Control key, and then pressing Enter immediately after writing the formula. If you have written the formula, and have already pressed Enter, you’ll need to write the formula again, and press Ctrl+Enter instead of entering. The Ctrl+Enter shortcut tells Excel to perform two tasks at once. Enter the formula, and, fill it down through all selected cells. The result of this command is shown image:
Step 5: Now, all that remains is to replace the formulas with their values. First, select the entire section. Excel doesn’t let us perform the next step with multiple ranges selected, so, we need to select a single column range.
Now, we just copy the range using any method you prefer (Ribbon, right-click, keyboard shortcut). Then, we do a Paste Special. In the Paste Special dialog box that pops up, we select Values, as shown in the image,
When we click OK, we are finished. We repeat these steps on the Account column, flat data as shown in the image:
Note: You can typically perform this task on multiple columns at the same time, it only works if the first row has values for all selected columns, so, just be sure to review and doublecheck your work.
How to Flatten Data in Excel Pivot Table? – FAQs
What does it mean to flatten a pivot table in Excel?
Flattening a pivot table in Excel means converting it from a complex, hierarchical structure into a simple, tabular format that is easier to analyze and work with.
How do I flatten a pivot table in Excel?
To flatten a pivot table, click on the pivot table to activate the PivotTable Tools menu, select the “Design” tab, choose “Report Layout,” and then select “Show in Tabular Form.“
Can I flatten data in Google Sheets?
Yes, you can use the =FLATTEN() function in Google Sheets to convert a range or multiple ranges into a single column.
Why is flattening data useful?
Flattening data simplifies analysis, improves data extraction, and makes reporting more straightforward by ensuring all relevant information is available in a tabular format.
How do I fill down labels in Excel?
Select the range, highlight empty cells using F5, enter a formula referencing the cell above, hold Ctrl and press Enter to fill down, and replace formulas with values using “Paste Special.”
Similar Reads
How to Flatten Data in Excel Pivot Table?
Flattening a pivot table in Excel can make data analysis and extraction much easier. In order to make the format more usable, it's possible to "flatten" the pivot table in Excel. To do this, click anyplace on the turn table to actuate the PivotTable Tools menu. Click Design, then Report Layout, and
7 min read
How to Delete a Pivot Table in Excel?
A pivot table is a tool in Excel that allows you to quickly summarize data in the spreadsheet. When it comes to deleting a Pivot Table, there are a few different ways you can do this. The method you choose will depend on how you want to delete the Pivot Table. 1.Delete the Pivot Table and the Result
3 min read
How to Create Pivot Tables in R?
In this article, we will discuss how to create the pivot table in the R Programming Language. The Pivot table is one of Microsoft Excel's most powerful features that let us extract the significance from a large and detailed data set. A Pivot Table often shows some statistical value about the dataset
2 min read
How to Prevent Grouped Dates In Excel Pivot Table?
We may group dates, numbers, and text fields in a pivot table. Organize dates, for instance, by year and month. In a pivot table field, text elements can be manually selected. The selected things can then be grouped. This enables you to rapidly view the subtotals in your pivot table for a certain gr
3 min read
How to Remove Pivot Table But Keep Data in Excel?
In this article, we will look into how to remove the Pivot Table but want to keep the data intact in Excel. To do so follow the below steps: Step 1: Select the Pivot table. To select the table, go to Analyze tabSelect the menu and choose the Entire Pivot Table. Step 2: Now copy the entire Pivot tabl
1 min read
How to Apply Conditional Formatting in a Pivot Table in Excel
One of the most useful ways to customize the pivot table formatting is using Conditional Formats. Conditional formatting rules can be applied to Pivot tables just like they can be applied to normal data ranges. So by using conditional formatting, we can highlight the cells with a certain color depen
8 min read
How to Remove Table Formatting in Excel
Struggling with unwanted table formatting in Excel? Whether you're working on a crucial report or just cleaning up your spreadsheet, knowing how to remove table formatting in Excel can save you time and frustration. Excel tables come with predefined styles that can sometimes get in the way of your p
5 min read
Exploring Data with PivotTables in Excel
Broad information examination can be done utilizing PivotTables and produce wanted reports. The joining of the Data Model with PivotTable improves how the information is examined, associated, summed up, and detailed. You can import tables from outside information sources and make a PivotTable with t
4 min read
How to Create a Power PivotTable in Excel?
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 rol
4 min read
How to Add a Calculated Field to a Pivot Table in Excel
A Calculated Field in Pivot Table allows you to perform custom calculations within your Excel Pivot Table, giving you more flexibility and deeper insights into your data. Whether you need to add a custom formula, modify existing calculations, or remove a field, this guide walks you through the essen
5 min read
How to Create Pivot Table in Excel using Java?
A pivot table is needed to quickly analyze data of a table with very little effort (and no formulas) and sometimes not everyone has time to look at the data in the table and see what’s going on and use it to build good-looking reports for large data sets in an Excel worksheet. Let's discuss a step-b
5 min read
How to Sort a Pivot Table in Excel : A Complete Guide
Sorting a Pivot Table in Excel is a powerful way to organize and analyze data effectively. Whether you want to sort alphabetically, numerically, or apply a custom sort in Excel, mastering this feature allows you to extract meaningful insights quickly. This guide walks you through various Pivot Table
7 min read
How to Rotate Pie Charts in Excel?
A Pie Chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportion.In this article, we'll see how we can create and rotate pie charts. How to make Pie Charts in Excel ? Follow the below steps to create a pie chart in Excel: Step 1: Formatting data for pie
2 min read
How to Create Relational Tables in Excel?
Excel directly doesn't provide us ready to use a database, but we can create one using relationships between various tables. This type of relationship helps us identify the interconnections between the table and helps us whenever a large number of datasets are connected in multiple worksheets. We ca
4 min read
Loading Data with Power Pivot in Excel
There are two ways to input data into Power Pivot: Data may be immediately loaded into PowerPivot, populating the database, or it can be loaded into Excel and added to the Data Model. You may either create connections and/or use the existing connections to import data into the Power Pivot Data Model
5 min read
How to Hide Zero Values in Pivot Table in Excel?
One of Microsoft Excel's most important features is the pivot table. You might be aware of this if you have worked with it. It provides us with a thorough view and insight into the dataset. You can do a lot with it. The pivot table might include zero values. In this lesson, you will learn how to hid
5 min read
How to Add and Use an Excel Pivot Table Calculated Field?
Excel pivot tables are one of its most helpful features. They are utilized to summarize or aggregate large quantities of data. The data can be summarized using the average, the count, or other statistical approaches. It summarizes a large amount of data into a few rows and columns. They make it simp
4 min read
Exploring Data with Excel Power Pivot
Power Pivot is an Excel one can use to perform intense information investigation and make modern information models. With Power Pivot, we can squash up enormous volumes of information from different sources, perform data examination quickly, and share experiences without any problem. In both Excel a
7 min read
How to Create Pivot Chart from Pivot Table in Excel using Java?
A Pivot Chart is used to analyze data of a table with very little effort (and no formulas) and it gives you the big picture of your raw data. It allows you to analyze data using various types of graphs and layouts. It is considered to be the best chart during a business presentation that involves hu
4 min read
How to Create a Two Way Table in R?
In this article, we will create a two-way table in R programming language. A two-way table is used to display frequency for two categorical variables. The rows represent the categorical features and the column represents frequency. We can create two-way table using as.table() method. as.table() func
2 min read