Google Sheets Power Query Equivalent: 6 Ways

How-to basics · Updated November 23, 2026

Google Sheets doesn’t have a feature literally called “Power Query,” but its closest built-in equivalent is the Data > Data cleanup menu combined with functions like QUERY, IMPORTRANGE, and UNIQUE. For a true Power Query-like experience, you can use the free add-on Power Tools or Google Apps Script to automate merging, transforming, and loading data. This article explains each option in detail so you can choose what fits your workflow.

What Power Query Does in Excel

In Excel (Microsoft 365), Power Query is a data connection and transformation engine. You use it to import data from files, databases, or web pages, then clean it with steps like removing columns, splitting text, unpivoting, and merging tables. Each step is recorded and can be refreshed later, so you don’t repeat manual work. It lives under the Data > Get Data ribbon tab.

Google Sheets has no single feature that replicates all of that. Instead, it spreads the functionality across several tools, each with a different learning curve. The good news: for many routine tasks—like combining monthly sales sheets or cleaning a messy export—you can get the same result with native functions.

Google Sheets Native Features That Mimic Power Query

These are the built-in tools you can use right now, no add-ons required.

  • Data > Data cleanup > Remove duplicates: Deletes duplicate rows based on selected columns, similar to Power Query’s “Remove Duplicates.”
  • Data > Data cleanup > Trim whitespace: Removes leading/trailing spaces and non-printing characters.
  • Data > Split text to columns: Splits one column into many using a delimiter (comma, space, custom).
  • Data > Create a filter: Applies a filter view, which is like Power Query’s filtering but not a permanent step.
  • Data > Data validation: Restricts what can be entered, but not a transformation.

These are manual, one-time actions. They don’t record a reusable query. For that, you need formulas or scripts.

The QUERY Function: Your Most Powerful Tool

The QUERY function is the closest thing to Power Query’s query editor. It uses a SQL-like syntax to filter, sort, aggregate, and join data. For example, with raw sales data in columns A (date), B (region), C (product), and D (sales amount), running:

=QUERY(A1:D100, "select B, sum(D) where C = 'Widget' group by B label sum(D) 'Total'", 1)

This returns a table of total sales per region for the product “Widget.” The third argument 1 tells Sheets the first row contains headers. This is a live formula—if the source data changes, the result updates automatically, just like refreshing a Power Query.

You can also use QUERY with IMPORTRANGE to pull data from another spreadsheet:

=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123", "Sheet1!A:D"), "select * where Col2 = 'East'")

Note that IMPORTRANGE requires you to grant access the first time you connect to a new sheet.

Using Functions to Mimic Power Query Steps

Many Power Query transformations have direct function equivalents in Sheets:

  • Remove duplicates: UNIQUE(range) returns unique rows.
  • Filter rows: FILTER(range, condition) e.g., =FILTER(A2:D100, B2:B100="East").
  • Sort: SORT(range, sort_column, is_ascending).
  • Merge tables: VLOOKUP or XLOOKUP (if you have the newer Sheets version) to bring in columns from another table.
  • Unpivot: Use FLATTEN combined with SEQUENCE for simple cases, but it’s tricky. For complex unpivots, consider the add-on.
  • Change data type: VALUE() to convert text to numbers, TEXT() to format numbers as text.

These functions are dynamic—they recalculate when data changes. However, they don’t show a step-by-step history like Power Query does. To see what you did, you’d have to look at the formula.

Power Tools Add-On: The Closest Visual Equivalent

If you want a point-and-click interface with a “Merge” and “Split” wizard, the Power Tools add-on (from Ablebits, available in the Google Workspace Marketplace) is the most popular choice. It adds a sidebar with tools for:

  • Merging tables by key column
  • Removing duplicates or comparing columns
  • Splitting text by delimiter or position
  • Transforming case, trimming spaces, and more

It’s free for basic use, with a paid tier for advanced features. The add-on doesn’t record a scripted query, but it automates the manual steps. You can also use Sheetgo or Coupler.io for automated data pipelines between spreadsheets and external sources.

Google Apps Script: The Power Query Equivalent for Automation

For full control, you can write a Google Apps Script that mimics Power Query’s “M” language. You create a script that reads data, transforms it, and writes to a new sheet. Here’s a simple example that removes duplicates from column A:

function removeDuplicates() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data");
  var data = sheet.getDataRange().getValues();
  var uniqueData = [];
  var seen = {};
  for (var i = 0; i < data.length; i++) {
    var rowKey = data[i].join("|");
    if (!seen[rowKey]) {
      uniqueData.push(data[i]);
      seen[rowKey] = true;
    }
  }
  sheet.getRange(1, 1, uniqueData.length, uniqueData[0].length).setValues(uniqueData);
}

You can run this from the script editor (Extensions > Apps Script). Unlike a formula, this physically changes the data. You can also set a time trigger to run it automatically. But be careful: scripts can’t be undone with Ctrl+Z, so always make a copy of your spreadsheet before running a macro-like script.

How to Choose the Right Approach

Your choice depends on how often you need to transform data and whether you want automation.

  • One-time cleanup: Use Data > Data cleanup and manual split.
  • Recurring report with live data: Use QUERY with IMPORTRANGE or FILTER.
  • Complex merges without coding: Use Power Tools add-on.
  • Automated scheduled tasks: Use Google Apps Script with triggers.

For example, if you get a weekly CSV export of orders, you could either manually import and run a script, or you could use QUERY with IMPORTDATA to pull the CSV directly from a URL and transform it live.

Frequently Asked Questions

Can I use Power Query in Google Sheets?
No, Power Query is an Excel feature. Google Sheets doesn’t have it, but you can replicate most of its functionality with functions, add-ons, or Apps Script.

Is the QUERY function the same as Power Query?
Not exactly. The QUERY function uses a SQL-like language and works on data already in the sheet. Power Query is a separate data connection tool that can import from external sources and record steps. But for many tasks, QUERY is sufficient.

How do I unpivot data in Google Sheets?
There’s no direct menu command. You can use a combination of FLATTEN and ARRAYFORMULA for simple cases, or use the Power Tools add-on which has a dedicated Unpivot feature.

Can I automate data refresh like Power Query does?
Yes. If you use IMPORTRANGE, IMPORTDATA, or IMPORTXML, the data refreshes automatically when the source changes. For Apps Script, you can set a time-driven trigger to run the transformation on a schedule.

Is there a free alternative to Power Tools?
Yes, the built-in functions are free. For more advanced merging, you can write your own Apps Script or use the free tier of Power Tools, which covers basic merge and dedupe.

Does Google Sheets have a Power Query-like add-on that records steps?
No add-on currently records a step-by-step query like Power Query. The closest is Power Tools, which gives you a wizard but doesn’t save the steps as a script. For that, you’d need to write Apps Script yourself.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.