Power Query and Power Pivot are two Excel add-ins that work together: Power Query imports and cleans your data, and Power Pivot builds relationships and calculations on top of it, feeding into pivot tables that handle far more rows than Excel sheets can. The short version is: load your data with Power Query, send it to the Data Model, relate the tables in Power Pivot, then build a pivot table from the model. In modern Excel versions both tools are built in — you enable them from File > Options > Add-ins (COM Add-ins), or they already appear on the ribbon. Menu labels can differ slightly between Excel versions, so if a name does not match exactly, look for the closest equivalent in the same area of the ribbon.

What You'll Need

  • Excel for Windows — Power Query and Power Pivot are built into current Microsoft 365 and Excel versions; on older versions you may need the free Power Query add-in or Power Pivot add-in, and the free Power Pivot add-in is not available in all editions
  • Raw data in a consistent format: CSV files, database exports, folders of files, or Excel tables
  • Basic familiarity with Excel tables and pivot tables

Step-by-Step

  1. Enable the add-ins (if needed). Go to File > Options > Add-ins. At the bottom, in the Manage box, select COM Add-ins and click Go. Tick Microsoft Power Pivot for Excel and confirm. Power Query appears on the Data tab as Get Data in modern versions, so if you see Get Data there, Power Query is already active.
  2. Import your data with Power Query. Go to Data > Get Data and choose your source — From File for CSV or workbook files, From Database for a SQL source, or From Folder for many files at once. Select your file or connection and click Import or Transform Data.
  3. Clean the data in the Power Query Editor. The editor opens in a separate window. Common fixes here: remove top rows if headers are misaligned (Home > Remove Rows), change column types (click the icon in each column header and pick Text, Whole Number, Date, and so on), rename columns by double-clicking the header, remove errors (Home > Remove Rows > Remove Errors), and filter or split columns as needed. Every step is recorded in Applied Steps on the right, so you can edit or delete any of them later.
  4. Repeat for each table you need. If your analysis needs several sources — for example a sales table and a products table — import each one the same way. Each becomes its own query.
  5. Load to the Data Model, not to a worksheet. In the Power Query Editor, click Close & Load (or the arrow on it) and choose Close & Load To. Tick Only Create Connection and Add this data to the Data Model, then click OK. This is the key step: loading to the Data Model sends the data to Power Pivot instead of cluttering your workbook with sheets.
  6. Open Power Pivot and create relationships. Go to the Power Pivot tab and click Manage, then switch to Diagram View. Drag a field from one table onto the matching field in another — for example, drag ProductID from Sales onto ProductID in Products. A line appears showing the relationship. Alternatively, go to Data > Relationships in the main Excel window and click New to define them there.
  7. Create measures with DAX. Back in the Power Pivot window, click in the empty area below a column and type a DAX formula, for example: Total Sales := SUM(Sales[Amount]). Measures like this recalculate correctly for every cell of a pivot table, unlike ordinary worksheet formulas. Start with a few simple ones (sums, counts, divisions for averages) and build up as needed.
  8. Build your pivot table from the model. Go to Insert > PivotTable, or on the Power Pivot tab click PivotTable. Make sure Use this workbook's Data Model (or Add this data to the Data Model) is selected. Drag fields from any related table into Rows, Columns and Values — the relationships you created let you slice Sales figures by Products fields even though they live in separate tables.
  9. Refresh when the data changes. Go to Data > Refresh All. This re-runs every Power Query and updates the Data Model and all pivot tables in one pass. If your source files live in a folder, dropping a new file in it is enough — no need to redo any steps.

Common Mistakes

  • Loading queries straight to worksheets instead of the Data Model, which bloats the file and skips Power Pivot entirely
  • Leaving column types as Any/ABC123, which breaks sorting, date grouping and DAX calculations later
  • Creating relationships on fields with mismatched types (text vs number) — both sides must be the same type
  • Manually editing data in the loaded table — it gets wiped on the next refresh; all changes must happen in Power Query
  • Writing DAX measures that ignore filter context, or writing complex calculated columns where a simple measure would do
  • Hard-coding file paths that break when the folder moves — fix the path in Data > Get Data > Data Source Settings

Tips

  • Name your steps and queries clearly; six months later "Query7" tells you nothing
  • Use Data > Queries & Connections to see every query, its last refresh time and to edit or delete it
  • Keep raw data out of the workbook — connect to the source files so the workbook stays small and always current
  • Build measures rather than calculated columns wherever possible: measures are computed on the fly and keep the model lean
  • A Calendar (date) table related to your fact tables unlocks time intelligence functions like year-to-date in DAX
  • If several queries share cleaning logic, right-click a query and choose Reference to reuse its output

Troubleshooting

  • Refresh All fails with a data source error: check that the source file or folder still exists and that the path in Data Source Settings is correct. For databases, verify your credentials and that the server is reachable.
  • Relationship will not create: the lookup side must have unique values, and both columns must be the same data type. Fix types in Power Query, reload, and try again.
  • Pivot table shows the same total for every row: you likely used an implicit sum from a column instead of a proper DAX measure, or the relationship is missing — check Diagram View.
  • Numbers behave like text: change the column type in Power Query, and if values contain stray spaces, use Transform > Format > Trim first.
  • Power Pivot tab missing after enabling: close and reopen Excel; if it still does not appear, your Excel edition may not support the add-in.
  • Queries refresh very slowly: avoid loading unnecessary columns (remove them in Power Query), filter rows as early as possible, and load only to the Data Model.

Frequently Asked Questions

What is the difference between Power Query and Power Pivot?

Power Query (also called Get & Transform) handles importing and shaping data — cleaning, merging and appending tables. Power Pivot handles modeling: relationships between tables and DAX calculations. Think of Power Query as the preparer and Power Pivot as the calculator.

Do I need to know DAX to use Power Pivot?

For basic pivot tables on related tables, no — relationships alone do a lot of work. But DAX is what makes Power Pivot powerful, and a handful of simple measures (SUM, COUNTROWS, DIVIDE) covers most everyday needs.

Is Power Query available in Excel for Mac?

Yes, current versions of Excel for Mac include Power Query for many common sources, though the feature set is more limited than on Windows. Power Pivot, however, is Windows-only — Mac users cannot build or edit the Data Model.

How much data can Power Pivot handle?

The Data Model uses columnar compression and can hold far more rows than a worksheet's limit, which is around a million rows. Very large or frequently changing datasets are still better served by a database source that Power Query connects to.

Can I use Power Query without Power Pivot?

Absolutely. Power Query alone is excellent for cleaning and combining data you then load to a normal table. Power Pivot becomes valuable when you need multiple related tables, measures, or more rows than a sheet can hold.

Does refreshing update the pivot tables automatically?

Refresh All updates the queries, the Data Model and pivot tables in one pass. If a pivot still looks stale, right-click it and choose Refresh directly, and check that pivot options are set not to retain dropped items.