Open navigation

How to modify, move, and duplicate Supermetrics queries in Google Sheets

When you create a query with Supermetrics in Google Sheets, you can modify it afterward in the Supermetrics sidebar. You can also move queries from one cell to another or duplicate them.


You can give other users access to the Google Sheet with Supermetrics queries. The other users can refresh and edit the queries if they have the same or higher license package for Supermetrics. Note that they also need access to the data source to be able to edit the queries.


Instructions

Modify a query
  1. Click a cell in your sheet to select the query to modify. The selected query is highlighted in the Supermetrics sidebar.
  2. In the Supermetrics sidebar, click the pencil icon.
  3. Make any changes to the query setup, and click Apply changes.
    The query will be run again with the new setup. 
  4. When you're ready, click Exit.
Move a query

Before you begin

Whenever you create a query in Supermetrics, it creates the query's configuration in the SupermetricsQueries tab. This tab is hidden by default — to open it, click Extensions → Supermetrics → Manage queries. Every query in a file is stored here.


The queries are organized in rows starting at row 21.


You can also edit the configuration of queries directly here. If you change an element and refresh the query, it'll update based on the changes you made in its configuration.


Please note that while you can see all of the queries running in a file, there's no way to view all of your queries across all files.


Caution

Because the SupermetricsQueries tab stores your query configurations directly, you should take care when interacting with it. Follow the guidance below.

  • Don't rename the tab. This will break the sidebar, which won't be able to find the query configurations.
  • Don't delete the tab. If this tab is deleted, you'll lose your configurations. Supermetrics doesn't store them. If you delete this tab accidentally, restore the last good version from the file's version history to restore it.
  • Don't edit rows 19-20. This can cause glitches and reliability issues. Only add queries at row 21 and below.
  • New queries and copies should have an empty query ID. They'll be assigned a new, unique ID the first time the query is refreshed.


Instructions

Part of the query configuration stored in the SupermetricsQueries tab is the query's cell range in the file. The range address updates if the size of the data changes.


There are 2 ways to move a query around in the same file.


For smaller queries that need to be repositioned in the same tab:

  1. Find the query data you want to move.
  2. Highlight all the cells that are part of that query.
  3. Hover over the edge of the selection until you see a Hand icon.
  4. Click the icon, and hold. Drag your selection to its new location and unclick to drop it.

The range address will update automatically in the query's configuration.


For larger queries that need to be moved to the same tab or a new tab:

  1. Open the SupermetricsQueries tab.
  2. Find the row that contains the query you want to move.
  3. In that row only, delete the Query ID and Sheet Name values (columns A and D). 
  4. Delete the current value In the Range address cell (column E).
  5. Add the cell range you want to move the query to (for example, A1:J500) in the Range address cell. This will define the query's new location in the sheet.
  6. Move your cursor away from the row so it doesn't lock the cells.
  7. Open the sidebar, scroll down to Templates and workflow, and click Refresh all queries. This will refresh the query to its new location, as written in Range address, and create new Query ID and Sheet name values.

Double-check that all the query's data has been deleted from its original location. If this didn't happen, delete it manually to clean it up.

Duplicate a query
  1. Click a cell in your sheet to select the query to duplicate. The selected query is highlighted in the Supermetrics sidebar.
  2. In the Supermetrics sidebar, click the 3-dot icon.
  3. Select Duplicate query.
  4. Select a cell you want the duplicated query to appear.
  5. Make any changes to the query setup, if needed.
  6. Click Get data to table.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.