In this post I’ll show you how to create dynamic charts in Google Sheets, with drop down menus (data validation).
I get lots of questions on how to add interactivity to charts in Google Sheets. It’s a great question that’s worthy of a detailed explanation.
Dynamic charts can really enhance reports and dashboards, allowing for more information to be conveyed in the same amount of screen space. This article will show you how to use the data validation method to make a Google Sheets drop down menu to control a dynamic chart.
Step-by-step guide to creating dynamic charts in Google Sheets
This article walks through the steps to create dynamic charts in Google Sheets, with drop down menus so the user can select a parameter, e.g. a sales channel or name, and see the chart update.
It’s a relatively simple technique but surprisingly powerful.
Click here to get your own copy >>
The basic dataset
In this example I’ve created a small table showing annual mileages driven by various users:
Creating the drop-down menu
Let’s create a list of choices to present to the user that will control the chart. Here, the user will choose a driver from the list of names and the chart will then only show that driver’s data.
The data validation drop-down menu exists in its own cell, so put it next to the raw data table. I’ve chosen cell E2.
So click cell E2 with your cursor, then head to
Data > Validation menu option:
Make sure you have
E2 selected as the Cell Range. Then select the range of names
A3:A7 as the Criteria, as shown in this image:
You can leave the other settings as they are.
Click save. This will add a small grey triangle to the right side of input your cell, E2. Click on it and you’ll see a user input menu for names:
Now you have the Google Sheets drop down menu set up, you’re half way there.
Using VLOOKUP to dynamically retrieve data
You want to link your table of data to this Google Sheets drop down menu, so you can chart the data corresponding to the name we’ve selected.
Create a table using VLOOKUPs to pull in the data from the raw data table, using the value in the Google Sheets drop down menu as the search criteria.
Put these VLOOKUP formulas into cells F2 and G2 respectively:
Add headings to this interactive table: 2013 in F1 and 2014 in G1.
Create the dynamic chart
Finally, create a chart from this small dynamic table of data. Highlight the data, then click Insert > Chart menu:
Select a column chart and ensure that Column E and row 1 are marked as headers and labels:
Test your chart.
It should now be dynamic so that it changes whenever you select a new name from the Google Sheets drop-down menu:
You’ve now created your first of many dynamic charts in Google Sheets!
Now go forth and make beautiful, dynamic dashboards.
Here’s another example showing the steps of this technique side-by-side:
This is one of 10 techniques that can be used to build dashboards in Google Sheets – check out the other nine here.
Create an in-cell dropdown list – documentation from Google