Two Minute Reports Logo
Google Sheets

Run queries

Create and run queries that put data from your connections into Google Sheets.

A query is the request that fills a sheet. It says which data to get from your connections and where to put it in your spreadsheet.

Before you start

Make sure that you:

  • Installed the Two Minute Reports add-on in your spreadsheet
  • Created at least one connection in Connections

Create a query

Open Data Queries

In the Two Minute Reports sidebar, select Menu at the top left, then select Data Queries. Select Add.

Name your query

In Name, type a name that tells you what the query gets. For example, "Facebook Ads - November 2024" or "Google Analytics - Traffic".

Select a connection and accounts

In Use (Connection), select the connection. Then select one or more accounts from that connection.

Choose metrics and dimensions

  • Metrics are the numbers that you measure, such as clicks, impressions, revenue, or conversions.
  • Dimensions (Group by) split those numbers, such as by campaign, date, or platform.

Each connector has its own metrics and dimensions.

Set the date range

In Date, select the time period. You can select:

  • A preset range, such as Last 7 days, Last 30 days, or Last 3 months
  • A rolling range, such as Last N days
  • A custom range, or a range read from cells in your sheet. See Dynamic date range from cells.

Most ranges move forward on their own. See Date ranges that move forward.

Add filters and sort order

This step is optional. Open Filters to narrow the data, for example "Campaign contains 'Brand'". Open Sort to order the rows by a metric or dimension.

A filter can use a field that is not one of your columns. The field selects the rows, but it does not go into the sheet. See Filter by a field that is not in your report.

Run the query

Select Run query. The add-on saves the query, gets the data, and writes it to the sheet and cell that you set in Save on Sheet.

Query results

After the query runs:

  • The data appears in your sheet as a table.
  • You can format the data with Google Sheets tools, such as colors, fonts, and charts.
  • Each time that you run the query again, it gets the data again.

Date ranges that move forward

Custom Range and Custom Range (Cell reference) use the dates that you set. Custom Range (Dynamic End Date) keeps the start date that you set. Its end date is Today or Yesterday, so the range gets longer each day.

The add-on calculates all the other ranges in Date from the day of the run. Each time that the query runs, the add-on calculates the start date and the end date again. You do not edit the query to move the dates.

"Today" is the date in the time zone of the query. The time zone is the grey text to the right of the Date label, for example "Team Default". To change it, select that text or the globe icon next to it, then select a time zone in Timezone.

The sheet gets the new dates only when the query runs. To update the data automatically, schedule a refresh.

What the Last N ranges include

DateOptionsStart dateEnd date
Last N daysIncluding Today offN days before todayYesterday
Last N daysIncluding Today onN days before todayToday
Last N weeks (mon-sun)Including this week offThe Monday of the week N weeks before this weekThe Sunday of last week
Last N weeks (mon-sun)Including this week onThe Monday of the week N weeks before this weekToday
Last N weeks (sun-sat)Including this week offThe Sunday of the week N weeks before this weekThe Saturday of last week
Last N weeks (sun-sat)Including this week onThe Sunday of the week N weeks before this weekToday
Last N monthsIncluding this month offThe first day of the month N months before this monthThe last day of last month
Last N monthsIncluding this month on, Including Today offThe first day of the month N months before this monthYesterday
Last N monthsIncluding this month on, Including Today onThe first day of the month N months before this monthToday

The maximum for N is 1096 days, 104 weeks, or 36 months.

Some platforms keep data for a limited time only. See Get all the historical data.

A long date range can make a run slow. To make it faster, use Smart Refresh. Smart Refresh gets only the most recent days, and keeps the older rows that are in the sheet.

Tips for queries

  • Keep queries focused. Get only the metrics and dimensions that you need. Large queries make large, slow sheets.
  • Use clear names. A clear name helps you find the query months later.
  • Check your filters. Make sure that the filters give the result that you expect before you schedule the query.
  • Use several small queries. Several focused queries are often faster and easier to read than one large query.

Copy queries to a new spreadsheet

You can copy all the sheets and queries in a spreadsheet to a new spreadsheet, and pick different accounts for the copy. This is useful when you make the same report for several clients. See Copy a spreadsheet.

Get all the historical data (Long time)

To get all the data that an account has, select Long time in Date. In most queries, the list shows its dates next to it, from January 1, 2015 to today. The end date is today, and it moves forward each day.

For most connectors, Long time asks for all the data from January 1, 2015 to today. The connectors in the table below start later. The sheet does not always start on the first day that Long time asks for:

  • The account has no older data. The first row is the first day with data, for example the day that the account started to show ads.
  • The platform keeps data for a limited time only. The platform does not give data that is older than its limit.

These connectors get less history:

ConnectorThe oldest data that you can get
Facebook AdsAbout the last 36 months
Microsoft AdsThe last 36 months
Google Search ConsoleThe last 16 months
Facebook Insights, Instagram Insights, LinkedIn PagesThe last 2 years. Long time starts 2 years before today.
Google Ad ManagerThe last 3 years. Long time starts 3 years before today.
LinkedIn AdsJanuary 1, 2017
TikTok AdsJanuary 1, 2019

Common issues

If your query returns no data or unexpected data, check that:

  • The account has data for the date range
  • The connection still has access to the account
  • Your filters do not remove all the rows
  • The date range is correct for the connector. Some platforms keep data for a limited time only. See Get all the historical data.

If the problem continues, contact support.

Next steps

Copyright © 2026