Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can make visualizations from subsets of spreadsheet data. To do this, use the "Filter Data" field when you create your visualization: 

  1. Either create or edit your visualization
    • Learn how to create and edit a visualization
  2. Click inside the "Filter Data" field 
    • Find this field below the "Data Source URL"  
    • A data filter toolbox will open 
  3. Enter your filter criteria 
    1. See below for details
  4. Click OK
    1. You'll see a subset of your data on the chart

 

Writing filters

There are three sections in the data filter toolbox: an "If", a "Show," and "Order By" section. 

  • If sets which data values appear on the visualization 
  • Show sets which data categories appear on the visualization
  • Order by shows the order in which categories appear on the visualization

Let's say you have a list of countries, and a count of bronze, silver, and gold Olympic medals for each country in the following sheet: 

 BronzeSilverGold
USA321158333
Soviet Union21114725
UK125225451
France52147255
China29832197
Japan1256125

 

If Statement

You want to only show countries with more than 100 bronze medals. To do this, you can use an if statement. Choose options for the three drop down menus to make this statement: 

IF Bronze > 100

This hides France and Japan from your final graph. 

 BronzeSilverGold
USA321158333
Soviet Union21114725
UK125225451
China29832197

You can also stack criteria. In addition to showing countries where bronze medals > 100, you want to only show countries with fewer than 200 gold medals.