Sort & filter BigQuery data in Google Sheets

You can sort and filter billions of rows of BigQuery data in Google Sheets so it's easier to work with.

Important: To access BigQuery data in Google Sheets, you need access to BigQuery. Learn how to get started with BigQuery.

Sort & filter the preview tab

Sort your data

  1. On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data. Learn how to connect to BigQuery data.
  2. At the top of a column, click Filter Filter list.
  3. Choose whether you would like that column sorted in ascending or descending order. This sorts both text and numbers.
  4. Click Ok.
  5. At the bottom left of the sheet, click Apply.
Remove the sort
  1. On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
  2. At the top of a column that is sorted, click Filter Filter list.
  3. Click the sort that is highlighted. 
  4. Click Ok.
  5. At the bottom left of the sheet, click Apply.

Add a filter by condition

  1. On your computer, open a spreadsheet in Google Sheets that's connected to BigQuery data.
  2. At the top of a column, click Filter Filter list.
  3. Under “Filter by condition,” click the Drop-down Down arrow and choose your condition. 
  4. Click Ok.
  5. At the bottom left of the sheet, click Apply.
Remove a filter by condition
  1. On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
  2. At the top of a column that is sorted, click Filter Filter list.
  3. Under “Filter by condition,” click the Drop-down Down arrow and choose None
  4. Click Ok.
  5. At the bottom left of the sheet, click Apply.

Add a filter by value

  1. On your computer, open a spreadsheet in Google Sheets that’s connected to BigQuery data.
  2. At the top of a column, click Filter Filter list.
  3. Under “Filter by value,” click Add filter.
    • Tip: BigQuery grabs the top 500 values, which may take a few seconds.
  4. When the values and their frequencies load in the sidebar, check the values that you want to use.
  5. Click OK.
  6. At the bottom left of the sheet, click Apply.

You can also filter by selected cell value:

  1. On your computer, open a spreadsheet in Google Sheets that’s connected to BigQuery data.
  2. Right-click on a cell value that you want to filter.
  3. Click Filter by cell value.
  4. At the bottom left of the sheet, click Apply.

Tip: You can also filter by selected cell value on an extract.

Remove a filter by value
  1. On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
  2. At the top of a column that is sorted, click Filter Filter list.
  3. Under “Filter by value,” click Edit filter.
  4. In the sidebar, click Select all.
  5. Click OK.
  6. At the bottom left of the sheet, click Refresh preview.

Sort & filter your pivot table, extract, & chart

Sort your pivot table, extract, & chart

Use extracts & charts
  1. To open the right side panel, click the object. 
  2. Under “Chart Editor,” click Setup.
  3. Under “Sort,” click Add.
  4. Select the value you want to sort. 
  5. To change the order, next to the value you want to sort, click Right arrow Z or Z Right arrow A.
  6. At the bottom left of the sheet, click Apply or Refresh.
Tip: To remove sorted conditions, in the right side panel, click Setup. Under “Sort” click Remove Remove from outline.
Use pivot tables
  1. To open the right side panel, click on your pivot table. 
  2. Under “Chart Editor,” click Setup.
  3. Under “Row,” select the options you want under “Order” and “Sort by.”
  4. At the bottom left of the sheet, click Apply or Refresh.
Tip: You can change the options you chose under “Order” and “Sort by.”

Filter your pivot table, extract, & chart

Add a filter by condition
  1. To open the right side panel, click on your pivot table, extract, or chart. 
  2. Under “Chart Editor,” click Setup.
  3. Under “Filter,” click Add.
  4. Next to “Showing all items,” click the Drop-down Down arrow
  5. Under “Filter by condition,” select the condition.
  6. Click OK. 
  7. At the bottom left of the sheet, click Apply or Refresh.
Tip: To remove current filters, in the right side panel, under “Filters” click Remove Remove from outline.
Add a filter by value
  1. To open the right side panel, click on your pivot table, extract, or chart. 
  2. Under “Chart Editor”, click Setup.
  3. Under “Filter,” click Add.
  4. Next to “Showing all items," click the Drop-down Down arrow.
  5. Under “Filter by value,” click Add Filter.
  6. Select values to filter. 
  7. Click Ok or Apply.
  8. At the bottom left of the sheet, click Apply or Refresh.
Tip: To remove current filters, in the right side panel, under “Filters” click Remove Remove from outline.
true
Visit the Learning Center

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials, and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organize your inbox, and more.

Search
Clear search
Close search
Google apps
Main menu
6280753502784287387
true
Search Help Center
true
true
true
true
true
35
false
false