Add and edit data

Fields in reports

Learn how dimensions and metrics work in your reports.

This article describes how dimensions and metrics are handled in reports.

In Insights, a chart displays data from one or more fields. These fields are the dimensions and metrics provided by the data source attached to that chart. How the data appears depends on the type of chart and how you've styled it.

How data appears in your charts

In tables, the data appears in rows and columns, such as in this example based on a Google Sheet data source:

Sale date

Product ID

Sale Quantity

Unit Price

Jan 01, 2021

P001XL

280

100.000

Jan 01, 2021

A102XS

300

250000

Jan 02, 2021

P002L

528

245000

Jan 02, 2021

P002M

210

230000

Jan 02, 2021

A102XXL

321

241000

...

In Cartesian charts, dimensions are typically laid out along the horizontal (X) axis, while metrics values provide the vertical (Y) axis positioning. In a time series, the date range dimension provides the X axis and a breakdown dimension provides the data series.

In a pie chart, a dimension defines the number of segments, while a metric determines the size of each segment.

Geo charts use a dimension that contains geographic information (such as a country code, latitude and longitude, or Google Ads Criteria ID) to display your data on a map. The relative values of the metric determine the intensity of color on the chart, as show in this example showing that the majority of website sessions occurred in the United States:

Learn more about the charts you can use in Data Studio.

Use breakdown dimensions to group data

Many charts allow you to group your data by multiple dimensions. Each dimension you add to the chart groups the data into ever finer levels of detail. The first dimension in the chart is the primary; additional dimensions are called breakdown dimensions (because they allow you to breakdown or sub-categorize your data into smaller chunks).For example, in the following table, the primary dimension is Country, and the breakdown dimension is Year. The metrics in the table are aggregated first by country, then by year. (See below for more on how grouping affects metric calculation).

Country

Year

Population

Internet Users

Internet %

Iceland

2013

323,764

312,583

96.55%

Iceland

2012

320,716

308,560

96.21%

Bermuda

2013

65,001

61,945

95.30%

Norway

2013

5,079,623

4,828,354

95.05%

Iceland

2011

319,014

302,488

94.82%

...

Making sense of multi-dimensional data in a table can be challenging. Using other visualization types, such as this stacked bar chart, can help make sense of complex data.

How metrics are calculated

In Insights, metrics are calculated in two basic ways:

As overview totals

Metrics can be displayed as a summary statistic for the entire column (field) in your data set using the Scorecard chart.

The example below shows simplified data from Google Analytics. Here, the Avg. Time on Site metric is summarized for all users, regardless of any other consideration, such as whether they are new or returning visitors. The calculations for time on site are computed using the time difference between each user's initial session and the exit, with the sum of each session length averaged across three sessions.

In association with one or more dimensions

Metric values can be qualified by selected dimension(s). All the other chart types fall into this category.

In the following example, the bar chart pairs the Avg. Time On Site metric with the User Type dimension. This visualization lets you analyze this metric via returning vs new users, where the calculations are modified by the requested dimension.

Adding multiple dimensions to a chart refines your view of the data. For example, suppose you use both the User Type dimension and the Language dimension in a table to analyze time on site for your website. In this case, the calculation for new versus returning users is the same, but that calculation is aggregated per language. Your table might look like this:

User Type

Language

Avg. Session Duration

Returning Visitor

zh-tw

00:04:54

New Visitor

zh-tw

00:04:02

Returning Visitor

en-us

00:03:51

New Visitor

en-us

00:03:45

Returning Visitor

en-gb

00:03:33

...

  • Chart references

Edit fields in your reports

Change field names, aggregations, data types, and analytical functions at the chart level.

By default, the definition of the fields in your reports matches how those fields are defined in the underlying data source. Specifically, fields in the report have the same name, data type, and aggregation as in the data source.

The Field Editing in Reports data source option allows report editors to change field definitions at the chart level. Editing field definitions in the report makes customizing your reports faster and easier. It reduces or even eliminates the need to duplicate fields in the data source in order to apply different aggregations or functions to the same data. It also allows you to have canonical field definitions in the data source, while tailoring the fields to fit different report requirements.

How editing fields in reports works

When you create a report based on a data source that has the Field Editing in Reports setting turned on, all the fields in the report that use the data source become editable. This option applies to all reports that use that data source. To edit a field definition in a report:

  1. Edit the report

  2. Select a chart

  3. In the chart's DATA properties panel, click the field's data type icon on the left-hand portion of the field.

What you can edit

Editing a field lets you change the following :

  • The field's name. For example, you can rename Order Value to Average Order Value.

  • A metric's aggregation. For example, you can recalculate Order Value from Sum to Average.

    • This option isn't available if the field is a metric with Auto aggregation type.

  • The field's data type. For example, you can convert a Number to a Percent, or Text to a URL, or full Date to a date part.

  • A metric's comparison calculation. For example, you can apply a Percentage of Total function to your orders.

Learn more about comparison

Any changes you make to a given field only apply to that instance of the field in that chart. For example, if the Average Order field appears in a table and a bar chart in the same report, changing any of the attributes of that field in the table has no effect on the Average Order field in the bar chart.

Rename a field

You can change a field's display name in the selected chart. This lets you have multiple instances of the same field in a chart. For example, you can add 2 instances of the Order Value field to a table, and change the name of the second instance to Average Order Value. Use the aggregation options described below to change how the field is calculated.

Change the field aggregation

A field's aggregation determines how its data is calculated in the chart. You can select from the following aggregations:

  • Average

  • Count Distinct

  • Count

  • Max

  • Median

  • Min

  • Sum

Metrics with an aggregation of Auto can't be changed.

Change the field data type

A field's data type tells Insights what kind of data to expect as input. For example, Insights displays Text fields "as is," with no other processing. Even if the field contains numbers, Insights won't apply any numeric aggregation to it. A field defined as a URL, on the other hand, is displayed as hyperlinks.

When the specified data type and actual data don't match, unexpected results can occur. You can adjust a field's data type in circumstances when the data source hasn't been correctly configured and you don't have edit access to it. For example, converting a dimension containing valid data but defined as Text to a Date type can let you use it as date range dimension.

Change the date granularity

Changing a Date or Date & Time type aggregates the data by the new type. For example, instead of grouping your data by year, month, and day, you can group by year and month.

For example, if the date field contains the complete year, month, and day, you can group by year quarter.

Example

The tables below show the same data. The table on the right has the granularity set to YEAR QUARTER. Notice how the data has been aggregated according to the new time unit:

To change how compatibility mode dates group the data, use the Granularity option, NOT the Type option.

Dates and Times

Add comparison metrics

Compare row data to total in your charts.

You can add metrics that compare each row of your data to the total value of a column.

Add comparison metrics to a chart

  1. Edit your report.

  2. Select a chart.

  3. Click the Comparison calculation menu and select the desired comparison. See below.

  4. To display the metric's native value, change the Comparison calculation selection to None.

Compare to total

You can compare each row of data to the overall total for that field:

  1. Percent of total shows the current row's value divided by the total for that field.

Example

The table below shows the results of applying different "compare to total" options to the Order Value field. This lets you evaluate each order's contribution to overall sales.

Replace the data source for a component

Learn how to switch data sources in your reports.

You can replace the data source for selected charts and controls. Reasons you might want to do this include:

  • Copying a report and replacing your data source with a client's data source.

  • Switching the data source for a selected component from one account, sheet, or database table to another.

What happens when you replace a data source

When you replace a data source in your report, Insights tries to map the fields in the old data source to the fields in the new data source based on a number of matching criteria, including field ID, field name, and other configuration information from the report itself. Insights won't try to map your old fields in calculated fields and filters.

If no suitable match is found, your report may display components with the message: Chart configuration incomplete Invalid/Missing dimensions, metrics, filters.

To fix this, edit the incomplete components and select new dimension, metric, sorting, and/or date range fields.

We strongly recommend you review your entire report for accuracy after replacing any data sources used in the report.

Replace a component data source

  1. Edit your report.

  2. Select a charts or controls.

  3. On the right, in the selected component's property panel, select the DATA tab.

  4. At the top of the left-hand panel, click the current data source name.

  5. Select an existing data source, or, at the bottom, click NEW DATA SOURCE.

Replacing the data source for one component has no effect on the other components in your report.

Blend multiple data sources in a chart.

Add data to a report

Create and add data sources to reports and explorations.

The data in your reports comes from a data source. Here's how to add new and existing data sources to your reports.

Add data to a new report

  1. Sign in Insights

  2. Select Report menu

  3. Select a datasource from the list of available datasources.

  4. Click Create report

Add data to an existing report

  1. Edit your report.

  2. On the right, in the properties panel of the selected component, select the DATA tab.

  3. At the top of the left panel, click the current data source name.

  4. Select an existing data source or at the bottom click + CREATE NEW DATA SOURCE

  5. If you select Create New Data Source, the Create Data Source dialog box is displayed.

  6. Select the type of data you want to connect. Select a specific dataset and provide your authorization, if necessary. In the upper right, click Connect.

Create a reusable data source

Data sources you create from the home page can be used across multiple reports. To create a reusable data source:

  1. Sign in Insights

  2. Select Data Source menu

  3. Select Data Source, select the type of data you want to connect.

  4. Select the specific data set and provide your authorization, if necessary.

  5. In the upper right, Click CONNECT.

  6. In the page that appears, you'll see the list of fields provided by this data source.

To add this data source to a report, in the upper right, click CREATE REPORT.

Rename a data source

  1. Edit the data source

  2. In the upper left, next to the Insights logo, click the current name.

  3. Enter a new name.

Last updated