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
- On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data. Learn how to connect to BigQuery data.
- At the top of a column, click Filter .
- Choose whether you would like that column sorted in ascending or descending order. This sorts both text and numbers.
- Click Ok.
- At the bottom left of the sheet, click Apply.
- On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
- At the top of a column that is sorted, click Filter .
- Click the sort that is highlighted.
- Click Ok.
- At the bottom left of the sheet, click Apply.
Add a filter by condition
- On your computer, open a spreadsheet in Google Sheets that's connected to BigQuery data.
- At the top of a column, click Filter .
- Under “Filter by condition,” click the Drop-down and choose your condition.
- Click Ok.
- At the bottom left of the sheet, click Apply.
- On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
- At the top of a column that is sorted, click Filter .
- Under “Filter by condition,” click the Drop-down and choose None.
- Click Ok.
- At the bottom left of the sheet, click Apply.
Add a filter by value
- On your computer, open a spreadsheet in Google Sheets that’s connected to BigQuery data.
- At the top of a column, click Filter .
- Under “Filter by value,” click Add filter.
- Tip: BigQuery grabs the top 500 values, which may take a few seconds.
- When the values and their frequencies load in the sidebar, check the values that you want to use.
- Click OK.
- At the bottom left of the sheet, click Apply.
You can also filter by selected cell value:
- On your computer, open a spreadsheet in Google Sheets that’s connected to BigQuery data.
- Right-click on a cell value that you want to filter.
- Click Filter by cell value.
- At the bottom left of the sheet, click Apply.
Tip: You can also filter by selected cell value on an extract.
- On your computer, open a spreadsheet in Google Sheets that is connected to BigQuery data.
- At the top of a column that is sorted, click Filter .
- Under “Filter by value,” click Edit filter.
- In the sidebar, click Select all.
- Click OK.
- 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- To open the right side panel, click the object.
- Under “Chart Editor,” click Setup.
- Under “Sort,” click Add.
- Select the value you want to sort.
- To change the order, next to the value you want to sort, click A Z or Z A.
- 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 .
- To open the right side panel, click on your pivot table.
- Under “Chart Editor,” click Setup.
- Under “Row,” select the options you want under “Order” and “Sort by.”
- 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- To open the right side panel, click on your pivot table, extract, or chart.
- Under “Chart Editor,” click Setup.
- Under “Filter,” click Add.
- Next to “Showing all items,” click the Drop-down .
- Under “Filter by condition,” select the condition.
- Click OK.
- 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 .
- To open the right side panel, click on your pivot table, extract, or chart.
- Under “Chart Editor”, click Setup.
- Under “Filter,” click Add.
- Next to “Showing all items," click the Drop-down .
- Under “Filter by value,” click Add Filter.
- Select values to filter.
- Click Ok or Apply.
- 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 .