Data Studio Help Describe your issue
Help Center Community Data Studio
Learn Data Studio Videos and tutorials Data source tutorials Tutorial: Create a Google Sheets data source
Tutorial: Create a Google Sheets data source
Access your Google Sheets data in Data Studio repo!s.
A data source provides the data for a Data Studio report. In this lesson, you'll create a
data source that connects to one of your own Google Sheets.
In this article:
Prepare your data
Connect to Google Sheets
Configure the data source
Name the data source
Share the data source
Use the data source in reports
Related resources
Prepare your data
Follow these tips to make working with your Sheets data in Data Studio easier:
Use a separate worksheet for Data Studio data
Spreadsheets let you store and analyze your data in a flexible format that might be
difficult to model in Data Studio. We recommend creating a separate worksheet that you
for the data you want to see in Data Studio.
You can automate getting data from one worksheet into another using Google Sheets
functions. For example:
='Worksheet 1'!A1 - copies the contents of cell A1 in Worksheet 1.
Sheets provides others ways of fetching data from one cell or range of cells into another,
including:
VLOOKUP
HLOOKUP
QUERY
Table format
• The worksheet or range you connect to should have a simple tabular format. Each
column should contain only single cells: merged cells may cause your data to appear
incorrectly.
• Cells should only contain data: you can't import graphs or images, for example.
• The first row of the data should contain column headers. These will become the field
names in your data source.
Date format
• Dates in your Google Sheet should contain the full day, month, and year, for
example, 9/22/2020 or 2020-09-22.
• If you have time data, it should be combined with the date field, for
example, 9/22/2020 11:55:30.
• Date fields should be formatted as dates (using the Format > Number > Date menu
option in Sheets).
Other ways of handling dates are possible, but may require more work on your part.
Learn more about handling dates and times in Data Studio.
Data structure
Organizing your data in certain ways can make it easier to work with in Data Studio. For
example:
Long is better than wide. Limit the number of dimensions by grouping data into
categories, rather than having columns for each possible value. For example, if you are
measuring sales of fruit from a grocery store, doing this:
Date Fruit Quantity Sold
2017-07-06 Apples 100
2017-07-06 Oranges 75
2017-07-06 Bananas 150
2017-07-07 Apples 80
2017-07-07 Oranges 95
2017-07-07 Bananas 175
Long table example
...is better than this:
Date Apples Oranges Bananas
2017-07-06 100 75 150
2017-07-07 80 95 175
Wide table example
In the long table example, your data source only requires one dimension for the Fruit
category, whereas the wide table example requires one dimension for each type of fruit.
If you sold 100 varieties of fruit, you'd need 100 dimensions to measure them all using the
second example. This would be impossible to display in a Data Studio chart.
Grouping your data series into dimensions also makes filtering in Data Studio easier. For
example, in the long table example, it's easy to build a filter on Fruit = "Apples." In the
wide table example, you can't filter by type of fruit.
Understand your aggregations. If your Sheet includes aggregated data, such as sums,
averages, medians, etc., be careful not to mix that data with unaggregated data in Data
Studio charts. If you do, the numbers in those charts might not be correct. For example,
let's say the wide table above included a Totals row:
Date Apples Oranges Bananas
2017-07-06 100 75 150
2017-07-07 80 95 175
Totals 180 170 325
Wide table with totals
Scorecards in Data Studio would display inflated numbers for each of the fruit dimensions
(because it adds the totals to the un-aggregated metrics):
Apples Oranges Bananas
360 340 650
Scorecard examples
In this case, it's best to not include the totals row in the data source and instead, let Data
Studio calculate the totals.
Connect to Google Sheets
The first step in creating a data source is to connect to your data set.
1. Sign in to Data Studio.
2. In the top left, click then select Data Source.
3. In the connectors panel, select Google Sheets.
4. Select a Spreadsheet and Worksheet.
5. Optionally, uncheck Use first row as headers. The fields in your data source will
instead use the default Sheets column labels: "A," "B," "C," etc.
6. Optionally, uncheck Include hidden and filtered cells. These will now be excluded
from the data source
7. Optionally, specify a range of cells. Otherwise, the entire worksheet is used.
8. Click CONNECT in the upper right. The fields panel appears.
Con!gure the data source
The fields panel contains all the dimensions (the green chips) and metrics (the blue
chips) from the data set. You can fine-tune the data source by renaming or disabling
fields, adding calculated fields, and changing the aggregation and data type.
Learn more about modeling your data.
Add a metric
You can add a metric to the data source by clicking next to a dimension and selecting
one of the available functions. You'll need at least one metric to chart your data in Data
Studio.
Rename your data source
Data Studio automatically names your data source the same as your data set
name. If you want to change that, click the name in the upper left and enter
a new name.
You can also rename the data source later from the DATA SOURCES home
page by clicking the context menu and selecting Rename.
Share the data source
You can let other editors add this data source to reports by sharing it with them.
To share a data source
1. In the upper right, click
2. Enter the email addresses or Google Groups you want to share with
3. For each person or group, select the access (permissions). Permissions determine
what other people can do with the data source. Your choices are:
• Can view. People with this permission can view but not edit the data source.
• Can edit. People with this permission can both view and edit the data source.
Use this data source in repo"s
You can now create reports that get their data from your Google Sheet:
1. Click CREATE REPORTin the upper right
2. You'll see the report editor tool, and a table appears with fields from that
data source.
a. Use the properties panel on the right to change the data and style.
3. In the top left, name your report by clicking Untitled Report.
Related resources
• Google Sheets connector
• Report tutorials
• Share a data source
• Copy a data source
• Calculated fields
• Data source credentials
Was this helpful? Yes No
Need more help?
Try these next steps:
Ask the Help Community
Get answers from community expe!s
Data source tutorials
Tutorial: Create a Google Analytics data source
Tutorial: Create a Google Sheets data source
Tutorial: Create a BigQuery data source
What's new in Data Studio
Learn about new features and recent
changes.
©2022 Google - Privacy Policy - Terms of Service English