Yes. In Excel for Microsoft 365 on Windows, use Power Query to import or combine data from multiple Excel files, then load the resulting queries into the workbook’s Data Model and build a PivotTable from that model. For recurring files with the same layout, a folder connection is usually the easiest approach; for files containing different kinds of data, import them separately and relate their tables in Power Pivot.
What Power Pivot adds to a multi-file report
Power Pivot is Excel’s data-modeling feature. Rather than placing every source table on a worksheet and trying to summarize them separately, you can store tables in a workbook Data Model, connect related tables, and analyze them together in PivotTables. The model can include data imported from several Excel workbooks.
Power Query and Power Pivot have different jobs. Power Query connects to files, cleans and reshapes their data, and refreshes those steps later. The Data Model stores the resulting tables and their relationships. Power Pivot is the interface for managing that model and creating measures. A typical workflow therefore uses both Power Query and Power Pivot, even though people may casually call the whole process “using Power Pivot.”
For example, a business might receive a separate sales workbook each month. Power Query can append the monthly rows into one Sales table. A second workbook might contain product names and categories; that can become a Products table. In the model, a relationship between the product identifiers lets a PivotTable summarize sales by category without copying category names into every sales row.
Choose the right method for your files
The best import method depends on whether the files have the same structure and what you need to analyze. A folder connection is convenient for a series of similarly formatted files. Separate workbook connections are usually clearer when each file represents a different subject, such as sales, products, and stores.
- Same columns, many files: Use Power Query’s From Folder connector to combine files into one table. This is suited to monthly, weekly, or regional exports with consistent headers and data types.
- Different tables or subjects: Import each workbook or table as its own query, then load each query to the Data Model. Relate the tables using a shared key, such as ProductID or StoreID.
- One-time analysis: You can import individual files and append their queries in Power Query. This takes more setup than a folder connection but gives you direct control over which files are included.
“Append” and “merge” are not interchangeable. Appending stacks rows from tables with corresponding columns, as when combining January and February transactions. Merging joins columns from one table to another using matching values, as when adding product descriptions to transaction records. A Data Model relationship is different again: it connects tables for analysis without physically adding the lookup columns to the transaction table.
Combine matching files from a folder
For a repeatable folder-based report in Excel for Microsoft 365 on Windows, first put the source workbooks in a dedicated folder. Keep unrelated workbooks out of it, and make the files’ column names and structure consistent. Then follow these steps:
- Choose Data > Get Data > From File > From Folder, and select the folder containing the workbooks.
- Review the file list. Remove temporary or unrelated files before combining; a folder connection can otherwise pick up files you did not intend to include.
- Choose Combine > Combine & Transform Data. In the combine dialog, select the worksheet or table that represents the data in each workbook.
- In Power Query Editor, inspect the sample transformation and the combined result. Check column names, data types, blank rows, and any extra header or totals rows.
- Choose Home > Close & Load > Close & Load To. In the Import Data dialog, select Only Create Connection and check Add this data to the Data Model.
The exact combine dialog can vary with the workbook structure. Excel uses a sample file to determine how to interpret the others, so inconsistent sheets, different table names, extra title rows, or changed column headings can produce missing or misaligned data. If the source files contain formatted Excel tables, using the same table name and structure in each file generally makes the process easier to maintain.
After loading, select Insert > PivotTable and choose the option to use the workbook’s Data Model. The available label may vary slightly by Excel build. You can then place fields from the combined table into the PivotTable’s Rows, Columns, Values, and Filters areas.
Import separate workbooks as related tables
When files contain different entities, import each one separately. Use Data > Get Data > From File > From Workbook, select a workbook, and choose the relevant worksheet or named Excel table in the Navigator. In Power Query, clean the data as needed, then use Home > Close & Load > Close & Load To. Select Only Create Connection and Add this data to the Data Model. Repeat for each source.
Before creating relationships, identify a field that has the same meaning and compatible data type in both tables. For example, a Sales table might contain one row per transaction and a ProductID, while a Products table contains one row per product and its ProductID. ProductID should identify a single product in the Products table; repeated ProductID values in Sales are expected. Avoid matching on product names if names can be duplicated, edited, or formatted inconsistently.
Open Power Pivot > Manage to view the model. In Diagram View, you can create a relationship by dragging the key field from one table to the corresponding field in another, or use the relationship controls in the Power Pivot window. Excel’s relationship model generally expects the lookup side to contain unique key values. A many-to-many situation or duplicated keys on both sides may require restructuring the data rather than drawing a simple relationship.
Build useful PivotTables and measures
Once the tables are in the Data Model, create a PivotTable based on that model. You can use fields from more than one related table: for instance, put a product category from Products in Rows and a sales amount from Sales in Values. The relationship tells Excel how the tables correspond. If the relationship is missing, inactive, or based on the wrong field, results may be blank or misleading.
Excel can summarize numeric fields in a PivotTable using common operations such as sum, count, or average. For reusable calculations, Power Pivot also supports measures, which are calculations evaluated in the context of the PivotTable’s filters and selections. A measure for total sales, for example, can respond to filters for year, region, or product category without storing a repeated calculated value in every source row.
Create a measure from the Power Pivot window using Power Pivot > Measures > New Measure, then choose the table, name, and calculation. Use a measure when the result should aggregate correctly across different views; use a calculated column when you need a value calculated separately for each row. Measures use Data Analysis Expressions (DAX), a formula language distinct from ordinary worksheet formulas. If you are new to DAX, begin with a simple aggregation and verify it against a small, independently calculated sample.
Refresh the model when source files change
A folder-based query does not automatically update the moment a source workbook is added or edited. Refresh the workbook’s connections to rerun the query. Use Data > Refresh All to refresh the queries and connections together, or right-click an individual query in the Queries & Connections pane and choose Refresh. A successful refresh reads the files currently available at the source location and applies the saved transformation steps.
For a reliable recurring process, keep the folder path stable and agree on a consistent file format, sheet or table name, headers, and data types. If files arrive in a cloud-synced or network folder, confirm that the files are available and that the person refreshing the workbook has permission to read them. A saved query may fail when a folder is renamed, a drive is unavailable, or a source file has been moved.
Refresh settings can be adjusted through the workbook’s connection or query properties, where available, but automatic refresh should not be confused with real-time updating. The workbook still needs access to the sources, and refresh behavior depends on the connection and Excel configuration. For a controlled report, refresh deliberately and check the resulting row count, date range, and totals.
Common problems and how to prevent them
- Files have different layouts: Standardize headers and table structure before combining. If one file has a renamed column or an extra title row, Power Query may not interpret it like the sample file.
- Wrong worksheet or table selected: Check the Navigator and sample file selection. A workbook can contain several sheets, hidden sheets, and named tables, and not all of them represent the intended records.
- Numbers or dates appear as text: Set and verify the column’s data type in Power Query. Locale-specific date formats can be interpreted differently, so confirm that dates such as day/month/year were not read as month/day/year.
- Duplicate records appear: Check whether the folder contains an old export, backup, or temporary copy. Also confirm whether each file is a new period or a complete replacement snapshot; combining snapshots can count the same transactions more than once.
- PivotTable totals look wrong: Inspect the relationship keys, duplicates on the lookup side, and the aggregation chosen for each field. A count of transaction rows is not the same as a distinct count of customers.
- Refresh fails: Check the source path, access permissions, file availability, and whether the expected sheet or table still exists. Review the Power Query error details rather than assuming the model itself is damaged.
One common misconception is that adding several files to a PivotTable automatically combines them correctly. The model needs a deliberate import and table design. Likewise, putting all source data into one huge worksheet is not required: the Data Model is designed to hold related tables separately, while the worksheet grid has a limit of 1,048,576 rows. Model capacity depends on available memory, data shape, and workbook environment rather than on a single universal row limit.
Power Pivot versus other Excel approaches
For a small, one-off task, copying data into one worksheet and creating a conventional PivotTable may be the quickest route. It is easy to understand, but it requires manual consolidation and can become error-prone when files arrive regularly. Power Query alone can combine and transform files, then load the result to a worksheet; that may be sufficient if you need one flat table and do not need relationships between separate tables.
Power Pivot is most useful when the reporting model has multiple related tables, needs reusable measures, or includes more rows than are practical to manage on worksheets. It is not a replacement for careful source-data design. If the files are inconsistent or lack stable keys, resolving those issues is often more important than choosing a particular Excel feature.
Availability and practical limitations
These instructions target the desktop version of Excel for Microsoft 365 on Windows. Power Pivot is a Windows desktop feature, and its availability can depend on the Excel edition and organization’s license. If the Power Pivot tab is missing, check File > Options > Add-ins. At the bottom, choose COM Add-ins beside Manage, select Go, and see whether Microsoft Power Pivot for Excel is available to enable. If it is not listed, the installed edition or license may not include it.
Excel for Mac does not provide the same Power Pivot authoring and model-management experience as Excel for Windows. Excel for the web also does not offer the full Windows Power Pivot workflow. A workbook containing a model may have different viewing or editing capabilities across platforms, so create and maintain the model in supported Windows desktop Excel if the workflow depends on Power Pivot. Feature and connector availability can change by release, so check the capabilities of the specific Excel installation.
Frequently Asked Questions
Can Power Pivot combine multiple Excel files automatically?
Yes. Use Power Query’s From Folder connector to combine files that follow a compatible structure, then load the result into the Data Model. You still need to refresh the query when source files change.
Should I combine files or create relationships between them?
Combine files when they contain the same kind of records and should form one longer table. Keep different subjects in separate tables and relate them when they have a reliable shared key, such as ProductID.
Do all files need the same column names?
For a straightforward folder combine, consistent column names and structure are strongly recommended. Power Query can handle some differences with explicit transformations, but unexpected headers or missing columns can lead to errors or incomplete results.
Can I add another monthly file later?
Yes, if it is placed in the connected folder and follows the expected structure. Run Data > Refresh All, then check that the new period appears and that totals are reasonable.
Can I use Power Pivot on a Mac or in Excel for the web?
Not for the full model-authoring workflow described here. Use Excel desktop for Microsoft 365 on Windows to create and manage the Power Pivot model; other platforms have more limited support.
Related
- Excel Update Dropdown List Values: A Practical Guide
- Excel Unable to Find Circular Reference?
- Excel Turn Off Page Break Lines on Screen
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Add a Goal Line to an Excel Chart: Steps That WorkTo add a goal line to an Excel chart, add a second data series containing the goal value…
- 3D Pie Chart in Excel: How to Create and Format ItTo create a 3-D pie chart in Excel for Microsoft 365 on Windows, select a two-column list of…
- Bar Chart Formula in Excel: How to Create OneThere is no special Excel formula that creates a bar chart: a chart is an object you insert…
- Online Pivot Table Chart: How to Create, Read, and UseAn online pivot table chart is a visual summary built from data organized in a pivot table. In…
- Excel Pivot Table Dates by Week: Grouping and FixesTo show Excel PivotTable dates by week, place the date field in Rows, right-click a date in the…
- Excel Pivot Table Rows Side by Side: Layout, Steps, and TipsTo put PivotTable row fields side by side in Excel for Microsoft 365 on Windows, click inside the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.