UltimatePTGuide

The Ultimate Guide to Pivot Tables

Pivot tables are one of the most powerful tools in Excel and Google Sheets, allowing users to quickly analyze and summarize large datasets. This article will provide a comprehensive guide to pivot tables, including advanced features and common troubleshooting tips.

What is a Pivot Table?

A pivot table is a data summarization tool that is used in the context of data processing. Pivot tables can automatically sort, count, and total data stored in one table or spreadsheet and display the summarized data. This makes them invaluable for data analysis tasks, especially when dealing with large datasets.

A pivot table in Microsoft Excel.

How to Create a Pivot Table in Excel

Creating a pivot table in Excel is straightforward:

  1. Select the range of data you want to analyze.
  2. Go to the Insert tab and click on PivotTable.
  3. Choose where you want the pivot table to be placed.
  4. Drag and drop fields into the Rows, Columns, Values, and Filters areas to organize your data.

TIP: You can use ALT+N+V+T as a shortcut to create a pivot table in Excel instead of going through the Insert tab.

For a detailed step-by-step guide, check out our article on how to create a pivot table in Excel.

In some cases, you may have a data set which shows as a summary and with important fields going across horizontally rather than vertically. That can be challenging, but you can use Power Query to help you flip your data into a tabular format, which can be more useful for data analysis.

TIP: Do you keep changing the pivot table layout because you don’t like the default Excel setup? You can change the pivot table defaults!

Combining multiple sheets into one pivot table

If you are have multiple worksheets, then you don’t have to create one pivot table for each of them. Instead, you can combine them together with the help of Power Query. By doing so, this can drastically make your data analysis more efficient by having multiple sheets linked into just one pivot table, where you can easily slice and dice data. And with Power Query, it’s easy to trigger a refresh.

Working with Dates in a Pivot Table

Dates are a common type of data that often require special handling in pivot tables. Analyzing date-related data can provide valuable insights into trends, seasonality, and performance over time. One of the most powerful features of pivot tables is the ability to group dates into various intervals such as months, quarters, and years. This can make your data analysis more effective, especially when dealing with long periods.

Grouping Dates in a Pivot Table

Grouping dates allows you to summarize data on a periodic basis. This is particularly useful for identifying monthly trends and patterns, such as sales performance or seasonal variations. To group dates in a pivot table, follow these steps:

  1. Right-click on any date in the pivot table.
  2. Select Group from the context menu.
  3. In the Grouping dialog box, select how you want to group your dates.
  4. Click OK.
Grouping dates in a Pivot Table.

This is a great way of grouping your existing data. But you can also add to your data by creating calculated fields, which can take your pivot table to the next level.

Creating Calculated Fields in a Pivot Table

Calculated fields in pivot tables allow you to perform custom calculations on the data within your pivot table. This feature is invaluable for creating new metrics, combining existing data in meaningful ways, and enhancing your data analysis capabilities without altering the original dataset.

A calculated field is a new field that you add to your pivot table, which derives its value from performing calculations on other fields in the pivot table. For example, you can create a calculated field to calculate profit by subtracting costs from revenue or to determine the percentage change between two periods.

How to Add a Calculated Field

Here are the steps to create a calculated field:

  1. Go to the PivotTable Analyze tab.
  2. Click on Fields, Items & Sets in the Calculations group.
  3. Select Calculated Field from the dropdown menu.
  4. Define the Calculated Field:
  • In the Insert Calculated Field dialog box, enter a name for your new field in the Name box.
  • In the Formula box, enter the formula you want to use. You can use standard arithmetic operations (e.g., +, -, *, /) and reference other fields by their names.
  • For example, to calculate profit, you might enter a formula like =Revenue - Costs.

5. Click Add and then OK to insert the calculated field into your pivot table.

Benefits of Using Calculated Fields

  • Custom Metrics: Create specific metrics tailored to your analysis needs, such as profit margins, growth rates, or weighted averages.
  • Dynamic Analysis: Calculated fields update automatically as you change the layout or filter data within your pivot table.
  • Enhanced Insights: Combine data from different fields in new ways to uncover deeper insights and trends.

Tips for Using Calculated Fields

  • Use Descriptive Names: Give your calculated fields clear and descriptive names to make them easily identifiable in your pivot table.
  • Test Your Formulas: Ensure that your formulas are correct and yield the expected results by testing them with sample data.
  • Avoid Overcomplicating: Keep your calculated fields as simple as possible. Complex calculations can be harder to manage and troubleshoot.

By mastering calculated fields, you can significantly enhance the analytical power of your pivot tables, allowing for more sophisticated and insightful data analysis. You can even add IF statements to a pivot table with the help of calculated fields.

After leveraging calculated fields to generate custom metrics and enhance your data analysis, the next step is to efficiently filter and explore your pivot table data. This is where slicers come into play, offering an intuitive and interactive way to refine your data views and focus on specific subsets of information.

Setting Up Slicers in a Pivot Table

Slicers provide a user-friendly way to filter data in pivot tables, making it easier to view and analyze specific subsets of your data. They are particularly useful for interactive dashboards and reports, allowing users to quickly change the data displayed without modifying the underlying pivot table.

What is a Slicer?

A slicer is a visual filter in the form of a button that allows you to filter pivot table data quickly. Slicers make it easy to filter data by simply clicking on the values you want to include or exclude, providing a more intuitive and interactive way to work with your pivot tables. This is similar to how you would filter your data on a table by using drop-down options; slicers simply make the process easier.

How to Add a Slicer to a Pivot Table

Adding a slicer to your pivot table can be done with just a few clicks. Simply activate your pivot table, then take the following steps:

  1. In the PivotTable Analyze tab, click on Insert Slicer in the Filter group.
  2. The Insert Slicers dialog box will appear, listing all the fields available in your pivot table.
  3. Select the fields you want to use as slicers. You can choose multiple fields if needed (e.g., Product, Store, Salesperson).
  4. Click OK to add the slicers to your worksheet. Each selected field will have its own slicer.
Slicers in a pivot table.

Using Slicers to Filter Data

Once slicers are added to your worksheet, you can use them to filter your pivot table data:

Filter Data: Click on the buttons within the slicer to filter the data. Each button represents a unique value from the field you selected.

Multi-Select: To select multiple values, hold down the Ctrl key (or Cmd key on Mac) while clicking on the slicer buttons.

Clear Filters: To clear all filters applied by a slicer, click the Clear Filter button (a small filter icon with an X) in the top right corner of the slicer.

Benefits of Using Slicers

  • User-Friendly: Slicers provide a simple, visual way to filter data, making it easy for anyone to use, even those unfamiliar with pivot tables.
  • Interactive Reports: Slicers are perfect for interactive dashboards and reports, allowing users to dynamically filter data and gain insights quickly.
  • Multiple Field Filtering: You can use multiple slicers simultaneously to filter data by different fields, providing a more granular view of your data.
  • Consistent Filtering: Slicers ensure consistent filtering across multiple pivot tables that share the same data source, keeping your reports synchronized.

Slicers are not limited to Excel; you can also use slicers in Google Sheets.

TIP: You can adjust the size and shape of your slicers. You can also spread the selections across multiple columns. Under the Slicer tab, just change the number of columns you want for that selection.

Now that you’re familiar with slicers, the next step is to integrate these elements into a comprehensive and visually engaging dashboard. Dashboards combine multiple pivot tables, charts, and other data visualizations into a single, cohesive view, providing a powerful tool for data analysis and reporting.

Creating Dashboards with Pivot Tables

Dashboards are powerful tools that can help visualize a company’s performance, various economic data, travel statistics, and any other reports you want to analyze. They provide an interactive interface for users to explore and analyze data, making it easier to gain insights and make informed decisions.

What is a Dashboard?

A dashboard is a visual representation of key metrics and data points, typically displayed in a single view. Dashboards combine various elements such as pivot tables, charts, and interactive filters to provide a comprehensive overview of your data. They are particularly useful for monitoring performance, identifying trends, and facilitating data-driven decision-making.

An Excel dashboard.

Creating Pivot Charts

For any metric you want to create a chart or visualization for, you’ll want to consider creating a pivot table for it. From there, you can use pivot charts to do the rest.

To insert a pivot chart:

  • Click anywhere in your pivot table.
  • Insert a chart the way you normally would.
  • Select the type of chart that best represents your data (e.g., bar, line, pie chart) and click OK.

Format your pivot charts to enhance readability. Add titles, labels, and legends as needed. Use colors and styles that make the charts visually appealing and easy to interpret.

Combining Elements into a Dashboard

To create a cohesive and interactive dynamic dashboard, combine your pivot tables, charts, and slicers into a single worksheet. Some things to consider when doing so:

Layout Design:

  • Arrange the pivot tables and charts in a logical and visually appealing layout. Group related elements together.
  • Leave space for slicers and ensure they are positioned in a way that is easy for users to interact with.

Add Visual Enhancements:

  • Use shapes, colors, and borders to highlight key areas and separate different sections of your dashboard.
  • Add headers and text boxes to provide context and explanations for the data presented.
  • Arrange the slicers on your dashboard so they are easily accessible. Slicers should be placed near the relevant pivot tables and charts to facilitate easy filtering.

TIP: Connect Slicers to multiple pivot tables. To do this, right-click on the slicer and select Report Connections. Check the boxes for all the pivot tables you want to filter with the slicer.

Benefits of Using Dashboards

  • Real-Time Insights: Dashboards update automatically with changes to your underlying data, providing real-time insights.
  • User-Friendly Interface: Slicers and interactive charts make it easy for users to explore and filter data without advanced technical skills.
  • Comprehensive View: By combining multiple data points and visualizations, dashboards offer a holistic view of performance, trends, and key metrics.
  • Improved Decision-Making: Dashboards facilitate data-driven decision-making by presenting clear and actionable insights.

By following these steps, you can create powerful and interactive dashboards that leverage the full capabilities of pivot tables, charts, and slicers. This enables you to present complex data in an accessible and visually engaging format, driving better understanding and more informed decisions. You can create a dashboard in Google Sheets using similar approaches.

While pivot tables offer powerful data analysis capabilities and can significantly enhance your ability to work with large datasets, they are not without their challenges.

Biggest challenges with pivot tables

Some of the most common issues that users often encounter with pivot tables are the following:

  • Pivot tables by default aren’t formatted in a convenient way; users often end up adjusting the layout so that it is in a tabular setup.
  • Labels do not repeat, and that can make it difficult to read the table to determine what each line relates to. Here too, users need to change the default layout.
  • The formatting for fields can change when the data is refreshed if users haven’t adjusted the actual field settings themselves.
  • When referencing a pivot table in a formula, the GETPIVOTDATA function can be triggered if the option isn’t disabled.
  • The data source is updated and when it does, the pivot table doesn’t include the newly added information without manually having to adjust the range.

Pivot tables are incredibly useful in data analysis and by learning how to create and use them, you can improve your data analysis capabilities and create some stunning visuals. But be sure to watch out for some common pitfalls when creating pivot tables.

brave_BgNZKny8KG

How to Fix a Pivot Table That Is Not Refreshing

Is your pivot table not updating even though you’re refreshing the data? If that’s the case, that usually means there’s a problem with the data that your pivot table is referencing. Here’s how you can troubleshoot and fix the issue. Note: If your pivot table is linked to power query, you’ll want to first review that your query is updating correctly before moving forward.

Check your pivot table’s data source

The first thing you’ll want to do when you’re looking into problems with your pivot table’s data, is to start by going straight to the source. Click anywhere on your pivot table, as doing so will display the PivotTable Analyze tab on the ribbon. If you click in here, you’ll see an option to Change Data Source. Even though you may not necessarily want to change the data source, this is where you can see where your pivot table is pulling data from.

Changing the data source in a pivot table.

When you click on the button to change the source, you’ll see the table or range that your pivot table is referencing. In this example, it’s referencing the range A1:L150 in the Sales_Transactions tab:

Changing the data source for a pivot table in Excel.

If your data goes beyond the range, that’s where your problem exists. In my example above, the pivot table range only goes to row 150, but my data goes all the way to row 201.

Since the pivot table has a hardcoded range, anytime I add data beyond row 150, this pivot table will not include it, even if I do a refresh. The band-aid solution is to simply update the range to go to row 201. I could set a larger number for the row to give myself more of a buffer, but the danger is always that the pivot table may not be optimally sized, and the risk is that not all of the data will be included even when a refresh is done.

When creating pivot tables, the ideal solution is to put your data in a table

To avoid the issue of a pivot table refresh not updating your data, the best option is to put your data into a table. Once in a table, your range will automatically update, and you no longer need to worry about how many columns or rows to include; the table will expand as you add more data.

To create a table, click anywhere on your data set, and go to the Insert tab, where you’ll see a button for Table. By clicking this button, Excel will create a table and auto-detect your range. By default, it’ll also applying some formatting so that you’ll recognize it’s in a table format. But you can also change the color scheme of your table if you prefer.

A table in Excel.

Once you create a table, Excel also assigns a name to it. If it’s the only table in your sheet, you might see a name such as Table1 in the Table Design tab, under the Table Name field:

The table name field in Excel.

This reference now becomes a named range that you can use when creating or updating a pivot table. Rather than a fix ranged of cells, the pivot table can simply reference the table. And after making this change, any data that is added to the table will be included when the pivot table refreshes.

Creating a named range without a table

You don’t have to create a table to setup a dynamic named range for your data set, but it’s the easiest option. Another way is to create a named range that uses the OFFSET Function, which can automatically adjust based the number of rows and columns.

This is a more complicated setup, but how it works involves setting up a named range. Start by going to the Formulas tab and clicking on Name Manager. Then, click on the button for New, which will allow you to create a new name, and specify what range it refers to.

Creating a named range in Excel.

For the OFFSET function, you’ll need to also use the COUNTA function to count the number of non-blank rows and columns. Start by setting cell A1 as your starting position, and here is what the full formula will look like:

=OFFSET(A1,0,0,COUNTA(A:A),COUNTA(1:1))

This formula starts in cell A1 (which is where the pivot table begins in my example), doesn’t offset any rows or columns (the first two zero values indicate this), and then it counts the number of non-blank rows and columns, ensuring that it automatically expands. If you’re using this approach, you’ll want to make sure you have no other tables or data on the sheet, to ensure the COUNTA function is not picking up additional columns or rows, and expanding your range too far. And to keep it simple, I suggest putting your pivot table in cell A1.

Once you’ve created this named range, you can now use it as the data source for your pivot table, and it will do the same job as the table in that it will automatically expand as you add data.


If you liked this post on How to Fix a Pivot Table That Is Not Refreshing, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

RevPAR

How to Calculate RevPAR in Excel Using a Formula

Revenue per Available Room (RevPAR) is one of the most important metrics in the hospitality industry. It tells hotel owners and investors how efficiently a property is generating revenue from its available rooms. Whether you manage a small motel or analyze hotel stocks, knowing how to calculate and track RevPAR is an essential metric to know how a business is doing. It’s similar to the Average Daily Rate (ADR), but there are important differences to be aware of.

In this guide, I’ll cover:

  • What RevPAR and ADR are (and how they differ)
  • The formulas for each metric
  • How to calculate them in Excel
  • A real-world example dataset

Download the practice file here

How do you calculate RevPAR and ADR?

RevPAR stands for Revenue per Available Room. Unlike average daily rate (ADR), which only looks at occupied rooms, RevPAR takes into account all available rooms, giving you a more complete picture of overall performance.

The formula is as follows:

RevPAR = Room Revenue / Rooms Available

You can also calculate it an alternate way:

RevPAR = ADR x Occupancy Rate

Meanwhile, the formula for ADR is the following:

ADR = Room Revenue / Rooms Sold

As you can see, there is a close relationship between RevPAR and ADR, but each one gives you slightly different information.

A sample data set and calculation

In the below example, which is a sample projection, dates are filled in for 2026 with estimated rooms sold and room revenue. The hotel has 100 rooms available, which doesn’t change over the course of the year.

Hotel revenue in Excel showing dates, available rooms, rooms sold, and room revenue.

To calculate the ADR, we need to take the total room revenue and divide it by the number of rooms sold:

Hotel revenue in Excel showing dates, available rooms, rooms sold, room revenue, and ADR.

Now, to calculate RevPAR, we’ll take room revenue and divide it by rooms available:

Hotel revenue in Excel showing dates, available rooms, rooms sold, room revenue, ADR, and RevPAR.

An alternative way to calculate this would be to compute the occupancy rate for each date, and then multiply that by the ADR:

Hotel revenue in Excel showing dates, available rooms, rooms sold, room revenue, ADR, and RevPAR.

As you can see, unless there is full occupancy, the RevPAR will always be lower than the ADR, simply because its denominator is larger (rooms available versus rooms sold).

Analyzing the data

Now that you’ve setup a data set showing these metrics, you can analyze it in Excel in a couple of ways. One way is through the creation of a pivot table, where you can summarize data by months at a time. You can put the date in the Rows section and then group by months. And by putting the ADR, RevPAR, and Occupancy fields into the values section, and setting them to display the average (rather than the sum), you can have an easy way to summarize your key performance indicators:

Pivot table showing ADR, RevPar, and Occupancy rates for a hotel.

In addition, you could create a chart to compare ADR, RevPAR, and Occupancy, to identify trends and patterns in the data set. In the chart below, I’ve plotted all three items on line charts. I’ve put the occupancy on a secondary axis and adjusted the scale so that it fits firmly below the ADR and RevPAR figures, ensuring there is no overlap.

Excel chart comparing ADR, RevPAR, and Occupancy rates.

If you liked this post on How to Calculate RevPAR in Excel Using a Formula, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

Excel Sales Dashboard

How to Create a Dashboard in Excel to Summarize Sales Data

In this post, I’m going to walk you through the steps of creating a dashboard in Excel, from start to finish. You can use the sample data file to follow along with my example, which is not based on any real information but it represents a realistic data set. Here is an overview of it:

Sales data in Excel.

We’ll first start with preparing the data by creating pivot tables, then turning those pivot tables into charts, formatting the charts, and linking the relevant pivot tables together using slicers. We’ll also add some data that isn’t connect to any pivot tables but which can summarize the overall data set.

Step 1: Plan your dashboard and the key metrics you want to track

An important step in any dashboard creation is first thinking what data you want to track. This is crucial because if you can’t think of at least four metrics you want to plot on charts, then you may not have enough relevant data to create a useful dashboard. You may need to pull in more data. A dashboard that has just a few key data points is not going to be all that useful. For many users, the whole point of a dashboard is being able to easily stay on top various metrics and track trends and gain multiple insights in just a single page.

The sample data above has customer name, city, state, shoe model, category, size, and color. Those are a lot of useful metrics. Some easy metrics to track could include sales by date, by state, by category, and by model. That gives us a lot of things to track. You can add more but at the very minimum, you should be able to think of at least four charts you can create from your data set. Any less than that, and you might want to consider adding to your data set.

Step 2: Make sure your data is in a table

If you data isn’t already in a table, make sure to convert it into one. This is useful because when you create a table, you can setup an easy name to remember when creating your pivot tables. Rather than having to remember the sheet name and a specific range, you can just use a named range such as tblData.

To turn the data set into a table, click anywhere on your data and use the CTRL+T shortcut. Excel should automatically detect your range. If it doesn’t, make sure to adjust it. And then once it is correct, click on OK and you can set your table name in the top-left-hand corner, by simply typing tblData.

Creating a table name.

Another benefit of using a table is that if you add to your data set over time, you don’t have to worry about adjusting the range you’re referencing. If you use tblData as your range when creating your pivot table, you can confidently know that it will include new rows added to your data set (as long as there are no gaps).

Step 3: Create multiple pivot tables

I create a pivot table for every chart I want to track on a dashboard. This makes it easy to ensure everything is pulling from the same data source. To create a pivot table quickly, you can use the ALT+N+V+T shortcut. I prefer to put all the pivot tables on a separate sheet, which I’ll call the PT tab in this example.

Setup each pivot table with the metrics you want to track (e.g. shoe model in rows, sales in the values section). Repeat this for each metric you want to show on your dashboard.

Here are the pivot tables I’ve setup:

  • PivotTable 1: Rows: Shoe Model; Values: Sales
  • PivotTable 2: Rows: Category; Values: Sales
  • PivotTable 3: Rows: State; Values: Sales
  • PivotTable 4: Rows: Date; Values: Sales

PRO Tip: create one pivot table, then copy and paste it multiple times. Afterwards, adjust your fields. There is no need to go back to the data set each time and create a new one.

Step 4: Customize your pivot tables (optional)

For Pivot Tables 3 and 4, I’m going to make some additional adjustments. Since there are 50 possible states that can appear in my pivot table, this is not going to be useful to display on a chart; it will get very cluttered. Instead, what I will do is display the top 10 states.

To do this, select the drop-down option for the State field and choose Value Filters and Top 10.

Selecting the top 10 items for a pivot table.

By leaving the default selection, it will leave the top 10 items by sales. We can also sort the data from largest to smallest, by right-clicking on any of the items and selecting Sort and Sort Largest to Smallest

Sorting sales in a pivot table from largest to smallest.

This now shows us the top 10 states, sorted from largest to smallest in terms of sales.

Sales in a pivot table sorted by state, in descending order.

Next, for Pivot Table 4, which contains dates, we need to setup the correct grouping, as it may simply show the ungrouped dates. This may not be the case in your version of Excel, and that will ultimately depend on your settings.

Sales by date in a pivot table, ungrouped.

To group this, right-click on any of the dates and select Group, where you’ll see the following options for grouping your dates:

Grouping dates in a pivot table.

Let’s select months and years for the grouping. This avoids the potential issue of including multiple months together, which can be problematic if you have multiple years (e.g. you don’t want January 2025 and January 2024 being added together).

Now, we have a more organized data set by year and month.

Pivot table showing sales grouped by month and year.

But let’s also show current monthly values as well as cumulative values. To do this, simply drag the sales field a second time into the values section. The data will look identical, but if you select the drop-down arrow for the field, you can select Value Field Settings which will allow you to change how the data is displayed.

Selecting value field settings for a pivot table field.

In the Show Values As tab, there will be an option to show values as Running Total In. There, you can select Months (Order Date). We can also rename the field to say Cumulative Sales:

Changing the value field settings for a pivot table field.

This now gives us multiple views for the sales data: a monthly view, as well as a cumulative view. You’ll notice since it is based on month, the cumulative values don’t reset and continue adding on.

Pivot table showing monthly and cumulative sales.

Step 5: Format your value fields

Before moving on to the next step, now is a good time to adjust the different field settings for all your pivot tables, to ensure the values are formatted properly as numbers. This will make them easy to display on your dashboard. By going into each of the different fields in your value section and selecting Value Field Settings, you can adjust the Number Formatting. Let’s set the format to Currency and remove any decimal places, to minimize the space the values take up, while also making it clearing they are dollars (you can also adjust the symbol to your local currency):

Applying a custom number formatting to value fields in a pivot table.

Repeat these steps for all of your different value fields in your pivot tables.

Pivot table with values formatted as currency.

Step 6: Create the charts

With the pivot tables setup, the next step is to actually start creating the different charts. Here again, you’ll want to consider planning out your charts as well. You don’t want to create a boring dashboard which just has the same column or bar charts over and over again.

For the pivot table which shows dates, let’s use a combination that displays both column charts and line charts. To set this up, ensure you select Combo when choosing a chart type.

Creating a combo chart in Excel.

This creates the following chart:

Pivot chart in Excel showing a combination.

To clean this chart up, I’m going to remove the drop-down options and also the legend for values. For the latter, just select the legend and click the delete button. And to turn off the drop-down buttons, go into the PivotChart Analyze tab and press the Field Buttons option so it no longer shows that it is pressed:

The PivotChart Analyze tab in Excel.

This now creates a cleaner look for the chart:

Pivot chart in Excel showing a combination, without field buttons or a legend.

One optional change you may want to consider is to shrink the gap width to minimize the white space in the chart. By right-clicking on the chart and selecting Format Data Series, you’ll see an option to modify the gap width.

Formatting the gap width for a chart in excel.

By changing the gap width to 100%, this makes the columns wider:

Pivot chart in Excel with smaller column gap widths.

At this stage, it’s just a matter of customizing the chart to how you want it to look and feel. The changes I’ve applied are as follows:

  • Setting the columns to a green fill color.
  • Setting the line chart to grey with black data points.
  • Adding vertical lines to the chart.
  • Setting the plot area to a grey color.
  • Adding a border to the plot area.

This results in the following chart:

Combo chart in Excel showing cumulative and monthly sales values.

The next chart to create is for sales by category. For this one, let’s create a pie chart. The 3D pie chart in particular, looks like a good option for this pivot table:

Creating a 3D pie chart in Excel.

Let’s remove the legend and the field buttons again with this template. However, without legends, it’s hard to read and understand this chart. To get around this, let’s add labels. This can be done by clicking on any of the pie chart slices and selecting Add Data Labels. You can then right-click on any of the labels and select Format Data Labels where you can specify to include both the value and the Category Name. This, unfortunately is still a bit difficult to read:

A 3d pie chart in Excel.

To make this easier to read, right-click on any of data labels and select Change Data Label Shapes and select the rounded rectangle.

Changing data label shapes for an Excel chart.

After shrinking the font for the labels, it’s now easy to see them:

3d pie chart in Excel with labels.

Let’s also make the following changes:

  • Sort the pivot table so that the values in arranged from highest to lowest. This is helpful in reading a pie chart by seeing the largest values first.
  • Adjust the colors of the pie chart so that they are more gradual. On the Design tab, let’s adjust the colors so that they are different shades of blue.

Now, here is my finished 3D pie chart:

3d pie chart in Excel with labels and blue shading.

Next, let’s create a chart for the top 10 states. This one will be a simple, clustered bar chart. Here is how it initially looks:

A bar chart showing sales by state.

For this chart, I’ll make the following changes:

  • Reduce the gap width for the bar charts to 50%.
  • Change the color to purple.
  • Add data labels.
Bar chart showing top sales by state.

Lastly, I’ll setup the chart to show sales by shoe model. This will be just a simple clustered column chart that will be set orange:

Column chart showing sales by shoe.

PRO TIP: If you want to expedite the process of setting up your charts, you can select your chart and on the Design tab select a pre-defined style to apply to your dashboard. You can still make adjustments afterwards, but this can give you a good starting point.

Step 7: Add totals and headers

In addition to creating pivot charts, let’s also incorporate metrics, such as total sales and items sold. We can position these metrics above the main charts and slightly below the header. For now, let’s just refer to this as ‘Sales Dashboard’ for the sake of keeping it simple.

Let’s also merge cells and create a title for the metrics. One will be called ‘total sales’ and another will be ‘items sold’. This can be helpful to always show these totals, regardless of which filters are applied to pivot tables. Let’s also create a grey background color for these items to allow them to stand out more easily.

To generate these totals, all we need to do is sum up the sales from the main data table, which will be used for the Total Sales metric. And for the total items sold, we’ll need to total the quantity field from the data sheet.

Sales dashboard header with multiple metrics, tracking sales and items sold.

With these metrics, these numbers will not change even if the pivot table values change. This can be useful to just get a quick snapshot of everything that’s important.

Step 8: Add slicers and a timeline

To make this dashboard dynamic, it’s important to also add slicers. By doing this, someone can quickly apply multiple filters to all the pivot tables at once. To add slicers, select any of the pivot tables and click on the Insert tab and click Slicer. This will give you a list of all the fields which you can add as slicers:

Adding slicers to a pivot table.

These are the fields to add which may be ideal for this dashboard:

  • Category
  • Color
  • Shoe Model
  • Size
  • State

Let’s add all that slicers on the left-hand-side of the page, with the exception of the state slicer, which can go across the top. For that slicer, since there are so many different options, we can select the slicer and change the number of columns to 5.

Modifying the slicer settings in Excel.

This now produces a slicer that’s easier to scroll through:

Slicer showing multiple states across a row.

For fields where the items are short in length, setting up multiple columns can be ideal in this situation.

Since we have a date field, we can also add a timeline to this dashboard. Similar to adding slicers, select any pivot table, and on the insert tab, select the Timeline button.

Adding a timeline to Excel.

There is only one date field to select. Choose that and click OK, which will add the timeline.

At this stage a key part is to organize your slicers in a way that’s easy to read the options and scroll through them all. You can also apply custom formatting to all of them. In my example, I’ve applied a green color to the slicers. Here is how they are organized:

Dashboard with slicers and pivot charts in Excel.

Step 9: Link slicers and timelines to all pivot tables

You might think you’re done after the last step, but and important thing to do is to link all your slicers to all your pivot tables. This is key to ensure that all your charts updated based on a slicer or timeline selection. To do this, go through your slicers and the timeline created, and right click on them to select Report Connections. Upon doing so, you’ll see a list of all the different pivot tables that you can link to. Check them all off.

Setting up report connections.

If you do this for all of the slicers and timelines you’ve setup, clicking any one of them will now link to all of your charts. Now, any slicers you select will impact all of the charts on your dashboard.

Step 10: Personalize your dashboard with a logo

You can structure your dashboard in a way that your slicers intersect in the top-left-hand corner, which can leave a space for a logo. This can allow you to easily insert an image for a company’s logo. You can go to the Insert tab and select Place Over Cells and This Device, if you want to select an item from your computer.

I’ve inserted my logo, which ties in well the green theme of my slicers.

Completed dashboard showing slicers, timelines, charts, and a logo.

You can also follow this video tutorial to help walk you through the process of creating this dashboard.


If you liked this post on How to Create a Dashboard in Excel to Summarize Sales Data, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

PivotTableMistakes

10 Pivot Table Mistakes to Avoid

Creating a pivot table is not difficult to do. If you just go to the Insert menu in Excel, there is an option to select a Pivot Table. As long as you have your data selected, Excel goes to work and creates the table. But making a good pivot table is an entirely different story. And that’s the real challenge — making your pivot table easy to read and understand, and not cumbersome to update. To help you with that process, here, I’ll list 10 of the most common mistakes you can make when creating a pivot table, and how you can avoid them!

1. Not cleaning your data beforehand

The old adage of “garbage in, garbage out” is true when it comes to data analysis, and pivot tables are no exception. If you have data that has incorrect values, then there’s no sense in creating a report on it. Take the time to check and review your formulas, make sure you don’t have any blank or missing values (or at least keep them to a minimum), and also check for spelling inconsistencies. That last one can be an easy one to miss. If you have a value with an extra space, that won’t be the same as a value without one.

If you spend the time of cleaning up and reviewing your data before you create a pivot table, you’ll save yourself some headaches and possible embarrassment later on; no one wants to provide their boss with a report that is incorrect.

2. Forgetting to use an Excel table

To convert your data into a table is easy — just use the CTRL+T shortcut. By doing so, you’ll ensure that your table will automatically expand and your formulas will copy down as you add new entries and rows. And as long as you pivot table references your table, then you won’t have to worry about re-adjusting the range later on. Otherwise, if you’re referencing a static range, the danger is that you forget to include new data as you add on to it. And in that situation, your report may once again be incorrect.

3. Not refreshing after data changes

Even if you’re using a table, you still need to ensure that your pivot table is refreshed. Unless you have a macro setup, this is a process you’ll need to do manually. By right-clicking on your pivot table and clicking Refresh, your data will update. You can also go to the Data tab and select Refresh from there.

Alternatively, if you right-click and select Pivot Table Options, under the Data tab, you can choose to Refresh data when opening the file, which will do a refresh when first opening the file.

Selecting the option to refresh a pivot table when the Excel file opens.

4. Using merged cells in source data

Merged cells can cause lots of issues in Excel, including with pivot tables as that can cause problems when grouping your data. If you have merged cells, that can also mean that values are missing from certain fields. Merged cells should generally be avoided in Excel, and even if you want to spread a title across multiple cells, as you might with a header, there’s an easy way to look as though you’re merging a value without actually merging the cells.

5. Dragging text fields into the values area

If your pivot table looks like this, where you have a count of values when you’re expecting to see a summation or an average, it’s likely that you’ve put a text value in the values section:

A pivot table showing a count of category.

This happens because Excel doesn’t know what to do with these values since it can’t add them. In the above example, a text field (category) has been placed in values section and upon doing so, Excel simply does a count of them. To fix this, ensure that you are correctly organizing your pivot table and not putting any text fields into the values section.

6. Not renaming field labels

When creating a pivot table, you might be tempted to leave the default names when setting it up. However, that can lead to unnecessarily long titles such as Count of Category or Sum of Sales.

A pivot table in Excel showing sum of sales.

You can fix this by selecting the arrow next to the pivot table field and clicking on Value Field Settings:

Modifying a field's settings in a pivot table.

You might be frustrated that you can’t change the name to the same label. If I were to change the field to simply say ‘Sales’ then I would get an error stating that it’s already in use since that is the source name. However, an easy workaround is to just add an extra space. By renaming it to ‘Sales ‘ it no longer triggers an error and in the pivot table, it will look as though I’ve used the same name as the source. It also saves space and can make your field names more meaningful; there’s no reason you have to use the defaults.

7. Using Inconsistent Date Formats

If your dates are not entered as dates, and some are reading as text, or perhaps are entered as day/month/year rather than month/day/year, this can be another problem, because it can mean your data isn’t being grouped correctly.

This can be a harder issue to catch and that’s where doing a spot check of your pivot table after it has been created is helpful. You can clean your data beforehand, but errors like this are more difficult to spot. This is why it’s always a good idea to review your pivot table, and make sure it makes sense. If you have sales in a future month, for example, that can be an easy way to spot that you have a possible problem with your dates.

8. Repeating the same layout changes over and over again

When you first setup a pivot table, the default layout may not be what you want. But instead of making the same changes over and over again, why not simply save them as your new default? Once you’ve made the changes that you want, such as repeating labels and/or displaying the pivot table in a tabular format, you can save your pivot table layout as a default. This can be done by going to File-> Options -> Data and selecting Edit Default Layout for your pivot table.

Editing the default pivot table layout.

You can import the layout by just selecting the pivot table you’ve modified and clicking on the Import button.

Setting up a default pivot table layout.

9. Making changes to individual cells rather than fields

One frustrating and easy-to-make mistake is to format pivot tables the way you might regular tables and other data in Excel. You might be tempted to select an entire column and change the formatting to how you want it. The problem? Once your pivot table refreshes, the data reverts back to its previous form. This is happening because you aren’t adjusting the underlying field settings.

To adjust the actual field, select it from your pivot table layout and go into Value Field Settings. Once there, go into the Number Format option and make any formatting changes there.

Changing the value field settings in a pivot table.

Now once you make the changes, they will remain intact, even after you update your pivot table.

10. Overcomplicating the Layout

As easy mistake to make with a pivot table is by cluttering it up with too many fields. In the below example, I have too many fields listed in the Rows section, and they’re in an order which isn’t logical, going from category->size->color->shoe model.

Pivot table with many row fields.

This doesn’t make the pivot table easy to read and understand. I have almost recreated the original table by setting it up this way. A good mix involves putting some fields in the rows section and some in the columns. And a good rule of thumb to follow is to use the fields which contain the most number of items in the rows section, rather than columns. This is because it’s a lot easier to scroll up and down with a mouse wheel versus horizontally and having to drag the scroll bar.


If you liked this post on 10 Pivot Table Mistakes to Avoid, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on X and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

PivotTableDefaults

How to Change the Default Layout of Your Pivot Table in Excel

The default pivot table layout can oftentimes be suboptimal. The compact view doesn’t make it easy for analyzing data, especially when you have many fields. If you’re like me, one of the first things you probably do after creating a pivot table is to change the layout so it’s easier to view the data. The good news is you don’t have to keep repeating those steps. You can change the default so that when you create a pivot table, it’ll already have your desired settings applied. In this post, I’ll show you how to do that.

Here’s a sample pivot table, which shows you sales broken out by city, state, customer, and in this case, the type of product (shoe) sold:

A pivot table in compact form in Excel.

There are many things which are suboptimal here, including the following:

  • The compact format has put the customer, city, and state fields all in the same column.
  • There are many subtotals, which create repeating values in this data set and are unnecessary.

To start, I’ll make these changes manually and then save those options as my default.

To turn off subtotals, I can go into the Design tab (the pivot table has to be selected for this to be visible) and under Subtotals, select the option to not show subtotals:

Turning off subtotals for a pivot table.

To change the layout from compact, I’ll stay in the Design tab and select Report Layout and choose Show in Tabular Form.

Selecting the tabular form for a pivot table.

This now produces the following pivot table:

Pivot table with subtotals off and in compact form.

This, however, is still not ideal as the state values only appear once. Instead, I’d like to see the value repeating so that every line has every field filled in. This makes it ideal if you want to use any formulas that reference the pivot table. Back in the Report Layout section, there is an option to select Repeat All Item Labels. Upon doing this, now my pivot table is filled in for all possible fields:

Pivot table with subtotals off and in compact form and repeating items.

This is how I prefer to setup my pivot table. But rather than having to repeat the process each time, I can save these settings.

How to save your preferred pivot table layout as the default

To save your preferred layout (after setting it up), go into the File tab and select Options at the bottom, which will open up the Excel Options. And if you navigate to the Data section, you will see the first option relates to the default layout of Pivot Tables — click the button to Edit Default Layout.

Changing the data settings under Excel Options.

Next, you’ll find all the different options you can specify for your pivot table:

Default pivot table layout options in Excel.

You can specify these different settings for subtotals, grand totals, and labels. Or, what you can also do is import the layout. To do this, simply click on a cell in your pivot table, and then click on the Import button. In my example, cell P14 contains my pivot table:

Import a pivot table layout in Excel.

After clicking the Import button, the settings are automatically applied and updated:

Pivot table default layout in Excel after importing settings.

As you can see, it has applied the changes for me, without having to make the changes manually from the different boxes and drop downs. This can be helpful if you’ve already setup a pivot table the way you want, rather than determining which different settings you want to apply. When you click on OK, now your settings will be applied.

The next time you create a pivot table, these saved settings will be in place and you won’t have to change them again. These settings are saved to your computer and even if you open a new Excel file and create a new pivot table, they will take effect.


If you liked this post on How to Change the Default Layout of Your Pivot Table in Excel, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

PivotByFunction

How to Use the PIVOTBY Function in Excel

PIVOTBY is a relatively new function that Excel introduced in 2021. It is a dynamic, formula-based alternative to pivot tables. It’s part of Excel’s push toward more dynamic, flexible data analysis, especially for users who prefer formulas over the drag-and-drop interface of traditional PivotTables. In this article, I’ll walk you through what PIVOTBY does, how to use it, and provide some examples to help you master it.

What Does the PIVOTBY Function Do?

PIVOTBY summarizes data based on one or more grouping columns and returns an array with calculated values—similar to a pivot table, but directly inside a formula.

It allows you to group data by categories (like region, product, or date) and then apply an aggregation function (like SUM, AVERAGE, COUNT, etc.) on another column. Here are the main arguments for the function:

PIVOTBY(row_fields,col_fields,values,function,[field_headers],[row_total_depth],[row_sort_order],[col_total_depth],[col_sort_order],[filter_array],[relative_to])

Only the first four arguments are required:

  • row_fields: this the range which will be used to group rows.
  • col_fields: this is the range which will group the columns.
  • values: this is a range for the data which is to be aggregated.
  • function: this determines how the data should be aggregate (e.g. SUM, AVERAGE, COUNT)

How the PIVOTBY Function Works

Here’s a sample data set that I am going to use to illustrate how the PIVOTBY function works:

Excel table showing expenses by department and employee.

In the above table, dates are in column A, the name is in column B, followed by store in column C, department in column D, and amount in column E. Assuming my data is in a table called tblData, I can use the following syntax to create a pivot table showing sales by name and store:

=PIVOTBY(tblData[Name],tblData[Store],tblData[Dollar Amount],SUM)

This produces the following values:

Summary of values generated in Excel using the PIVOTBY function.

If you want to turn off totals for the rows, then you can set the row_total_depth argument to 0, as is the case below:

=PIVOTBY(tblData[Name],tblData[Store],tblData[Dollar Amount],SUM,,0)

And if you want both column and row totals off:

=PIVOTBY(tblData[Name],tblData[Store],tblData[Dollar Amount],SUM,,0,,0)

You can also pull in multiple columns or rows with the help of the CHOOSE function. Suppose you wanted to pull in both the name and the department a person is from. Here’s how you can accomplish that, while also removing totals:

=PIVOTBY(CHOOSE({1,2},tblData[Name],tblData[Department]),tblData[Store],tblData[Dollar Amount],SUM,,0,,0)

This produces the following report:

Pivotby report showing expenses by employee, department, and store.

The benefit of this setup is that since this is a spill function, it will automatically update and populate the data and no refresh is necessary. There are, however, downsides to consider:

  • If there is not enough space for the pivot table, you will encounter a #SPILL! error.
  • Unlike a conventional pivot table, you can’t drill down to see the details
  • This won’t work on versions of Excel prior to 2021.

If you just want an easy way to summarize your data without the need for drilling down, then the PIVOTBY function can work well and be a suitable replacement for a normal pivot table. For more of a comparison between the function your typical pivot table, check out this video:


If you liked this post on How to Use the PivotBy Function in Excel, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

MultipleSheetsPivotTable

How to Make a Pivot Table From Multiple Sheets in Excel (Step-by-Step Guide)

Creating a Pivot Table is one of the fastest ways to summarize large amounts of data in Excel. But if your data is spread across multiple sheets, it can seem a little overwhelming. The good news is: you don’t have to manually copy everything into one sheet. You can easily combine multiple sheets into a single Pivot Table.

In this Excel tutorial, I’ll walk you through how to make a Pivot Table from multiple sheets, step-by-step, with the help of Power Query. If you want to follow along, download the practice file here.

Loading the data into Power Query

You will need to have your data setup in tables in order to combine all of it. However, you can do that all at once. Go through each tab and select your data, and under the Data tab, click on the option to get data From Table/Range:

Selecting from table/range when getting data into Power Query.

Excel will automatically detect your range. You can adjust if need be, otherwise, you just need to confirm whether it contains headers (which it should to avoid issues later on):

Creating a table before loading it into Power Query.

This now opens up Power Query, where your data is now visible:

A table loaded into Power Query.

On the Home tab, select the option for Close & Load and select Close & Load To and choose Only Create Connection.

Creating a connection to the data only in Power Query.

This ensures the data is added into Power Query but it does not create a new tab. Repeat these steps for the other tabs.

If you forget to select the option to only create a connection, then you can just delete the tab that is created afterwards; the result is the same — only a connection will be created. After loading five tables in this practice file and creating the connections, you should see the following queries under the Queries & Connections pane on the right-hand side (this should automatically display when you first add a table to Power Query).

The queries & connections pane showing multiple connections in Power Query.

With the data loaded, now let’s go into Power Query by right-clicking on any of these connections and selecting Edit.

In Power Query, on the left-hand side, you can edit the table names so that you know what they relate to:

Table names listed in Power Query.

By right-clicking on the table names, you can change them. I’ve renamed them so that it is clear which regions they relate to:

  • Table1: Northwest
  • Table2: Northeast
  • Table3: Southwest
  • Table4: Southeast
  • Table5: Central

In each table, I’m also going to add a field called Region, where I will list the names of those tables. By going into the Add Column tab and selecting Custom Column, I can enter in the new column name as well as the value. This is the custom column I’m creating for the Northwest table:

Creating a custom column in Power Query to match the table name.

After creating the column, this is what the updated table looks like:

Power Query table with the region field added.

Repeat these steps for the other tables, entering their specific regions for the Region field. In order to ensure the data is consolidated correctly, you’ll want to ensure that the field names are the same.

Appending the queries together

With all the data in Power Query, we can append the queries together, to create one large table. To do this, go to the Home tab and select the Append Queries as New option, which will create an entirely new query:

Appending queries in Power Query.

Select the option to append three or more tables and select all of them and then click OK:

Appending multiple tables in Power Query.

Now, all the tables are appended into one query:

Appended table in Power Query.

Now, this appended table can be loaded into Excel. In this instance, you don’t want to create just a connection but instead download the entire table into Excel.

This table can now be used to create a Pivot Table as you normally would, through the Insert -> Pivot Table option. And now, when creating your pivot table, you’ll see the values from all regions combined. You can now slice the data based on region and month, and whatever other fields are in the data set.

Pivot table with data from multiple sheets.

If you enter more data and want to update your pivot table, what you first need to do is go to the Data tab and click on Refresh All. This will refresh your queries. You will also need to do another refresh to ensure that the pivot table updates after that. This can be done by just right-clicking on the pivot table and clicking refresh rather than doing Refresh All again, which will also update the queries and may be more time consuming.


If you liked this post on How to Make a Pivot Table From Multiple Sheets in Excel (Step-by-Step Guide), please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

H2EPivotTableRunningTotals

How to Calculate Running Totals in a Pivot Table

Pivot tables in Excel are useful for summarizing data. But you can do more than just simple summations and can also calculate running totals based on multiple fields. In the spreadsheet which I’ll use for this example, I have sale by month and by category.

Sales values in Excel, broken down by month and category.

Creating and setting up the pivot table

The first step is to create the pivot table. This can be done by just clicking anywhere on the data set and going to the Insert tab and clicking on Pivot Table. I’ll put the dates in the Row section and the sales field in the Values section. I’ll insert the sales field a second time so that I can have one value for the raw monthly sales alongside the running total. Here’s what it looks like thus far:

Pivot table showing sales by month with multiple value fields.

To create a running total, I’m going to right-click on the second sales column and select Value Field Settings. Next, in the Show Values As tab I’ll select Running Total In and use Month as my base field. I’ll also rename the field to say Running Total:

Creating a running total field in a pivot table in Excel.

This sets up the pivot table to show my total sales alongside the running total. A good way to check to see that it is correct is to see that your grand total in the original sales field matches the last value in the running total:

Two sales fields in a pivot table showing the sales total and the running total.

You can also have running totals reset based on the category. In my data, I have electronics and furniture sales. To break it down by those sections, I’ll add the Category field above the Month field in the Rows section. Now I have the running totals broken out by category while still tracking year-to-date values.

A pivot table showing running totals broken out by month and category.

This format may be a bit confusing since the subtotals are above the data. What you may want to do is move the subtotals to the bottom of each section, so that it’s easier to compare them against the running totals to make sure they match up. To do this, click on the pivot table to activate the Design tab. Within there, there is a drop-down option for Subtotals where you can select to Show all Subtotals at Bottom of Group.

The subtotals menu options on a pivot table.

Upon selecting that option, the totals will now appear at the bottom.

A pivot table with subtotals at the bottom of a section.

If you like this post on How to Calculate Running Totals in a Pivot Table, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.

sddefault

Create an Automatically Updating Pivot Table in Google Sheets

Did you know you can create a pivot table in Google Sheets which automatically updates as you add data to it? Remarkably, it’s an easier process than in Excel where you would need a macro or where you might need to right-click on the pivot table and select to refresh the data. Here’s how we can go about creating a pivot table in Google Sheets, and having it automatically update.

Creating a pivot table in Google Sheets

For this example, I’m going to use the following data for my pivot table:

A table in Google Sheets.

To create a pivot table with this range, all I need to do is, with a cell selected, to go to the Insert menu and click on Pivot Table

Inserting a pivot table in Google Sheets.

As long as you have a cell selected on your data set, Google Sheets will automatically detect your range. If it looks correct, you can just select whether you want it to be placed in a new sheet or an existing sheet, and then click on Create.

Selecting where to create a pivot table.

The next part is to setup the pivot table and ensure that the value section contains values and you have something in either the rows, columns, or filters sections to summarize your data. In my example, I’m going to summarize my data by rep and store:

A pivot table in Google Sheets.

The pivot table is setup but the problem is it won’t automatically update. Here’s how we can fix that.

Setting up your pivot table so that it automatically updates in Google Sheets

The problem with this pivot table lies with the range. While Google Sheets correctly detected a range, it also set it to a specific number of rows. My data set went up to row 201 as it contained 200 rows of data. But if I add more data, my pivot table won’t automatically expand. To get around this, I need to adjust my pivot table range.

With my pivot table selected, I can see the range that it references in the Pivot table editor pane:

The pivot table editor pane in Google Sheets.

If I add another row of data, I can adjust this range so that it goes from A1:G202. But this would be a very tedious task if every time I added data I needed to remember to adjust the range. Instead, what I can do is adjust my range so that it references entire columns. By doing this, Google Sheets will automatically detect the size of my data set. In this example, I just need to set my range to A:G:

Changing the range in the pivot table editor.

Now my pivot table will include a blank value under the Salesperson field as well as a blank store value.

A pivot table in Google Sheets which includes entire columns.

To fix this, what I can do is hide row 3 and column B, since these ranges contain the blanks. And as long as the blank values always appear first, this can be an effective way to hide the data, even if the pivot table expands.

A pivot table with the empty rows and columns hidden.

If you like this post on How to Create an Automatically Updating Pivot Table in Google Sheets, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow me on Twitter and YouTube. Also, please consider buying me a coffee if you find my website helpful and would like to support it.