Edit fields in your reports

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

When you first create a chart, or add new fields to an existing chart, the field names, data types, and aggregations of the fields in the chart are the same as they are in the chart's data source. For example, let's say your data source has a field called Order Value, with a Currency (USD) data type, and an aggregation of Sum. By default, the Order Value field will be defined in the same way in every chart in which it appears.

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.

In this article:

Enable/disable field editing in reports

You enable or disable field editing in reports at the data source level. New data sources have this option turned on by default. You must be able to edit the data source to change this.

To turn this off or on (for older data sources):

  1. Edit the data source(s) used in your report
  2. In the data source header, click Field Editing in Reports.

Example of data source with field editing in reports enabled

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.

Example of editable fields

Example of editable fields.

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.
  • The field's aggregation. For example, you can recalculate Order Value from SUM to AVERAGE.
  • The field's data type. For example, you can convert a Number to a Percent, or Text to a URL.
  • For date fields, you can change the format. For example, you can show a full date (YYYYMMDD) as year month (YYYYMM).
  • The field's analytical function. For example, you can apply a Percentage of Total function to your orders.
  • The field's running calculation. For example, you can show running sums of your data, record by record.

Each of these actions is explained in more detail below.

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:

  • SUM
  • AVERAGE
  • MIN
  • MAX
  • COUNT
  • COUNT DISTINCT

Aggregation only applies to metric fields. Fields with an aggregation of AUTO can't be changed.

You can't change a metric to a dimension using field editing in reports. To do that, you must edit the data source and change the metric's aggregation to None.

Change the field data type

A field's data type tells Data Studio what kind of data to expect as input. For example, Data Studio displays Text fields "as is," with no other processing. Even if the field contains numbers, Data Studio 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.

Don't use the Type options to change the display of your dates. Use the Show As options, described below.

Change the date output format

Use the Show As options to change the display format of a valid date field. For example, if you have a complete year, month, and day date field, you can choose to display only the year quarter (YYYYQ) format.

Show As does not change the field's data type: it simply displays the underlying data in a new format. Your data will be aggregated according to the new time units, however.

Example

The tables below show the same data. The table on the right has the YEAR QUARTER (YYYYQ) format applied to the date field. Notice how the data has been aggregated according to the new time unit:

Example showing aggregation based on date format

Compare metrics to total values

The Display As option lets you compare a single metric in a row to the total value for that metric. This can give you a deeper understanding of your data, without having to create calculated fields in the data source.

Example

The table below shows the results of applying different Display As options to the Order Value field:

  1. Percent of total
  2. Difference from total
  3. Percent difference from total

This lets you evaluate each order's contribution to overall sales.

Example table showing percent of total, difference from total, and percent difference from total.

To compare metrics to totals

  1. Edit your report.
  2. Select a chart.
  3. In the DATA properties panel, select a metric and click its edit pencil .
  4. Click the Display As drop-down menu and select the desired comparison.
  5. To display the metric's native value, change the Display As selection to None.

Apply running calculations

Running calculations, also known as analytic functions, compute summary results across a collection of values. But unlike the metric comparisons described above, running calculations return a value for each row of input, expressing that row's relation to the collection as a whole.

The example below shows the application of 2 running calculations to the Analytics Users metric:

  1. Running sum
  2. Running delta

This allows you to see the cumulative number of users you have acquired up to a specific day, and how each day's numbers differ from each other.

Example

Example table showing running calculations.

See a demonstration report here.

Currently, Data Studio supports the following running calculations:

  • Running sum
  • Running average
  • Running min
  • Running max
  • Running delta
  • Running count

To apply a running calculation

  1. Edit your report.
  2. Select a chart.
  3. In the DATA properties panel, select a metric and click its edit pencil .
  4. Click the Apply running calculation drop-down menu and select the desired function.
  5. To remove a running calculation, change the Apply running calculation option to None.
To display the original metric and the metric comparison or running calculation in the same chart, add a second instance of the original metric by dragging it from the Available Fields panel. (You can't add a duplicate field using the metric or dimension picker.)

Differences between running calculations and calculated fields

Running calculations make it easy to show complex data relationships, without having to code custom SQL queries in your data set. Such queries would be difficult, if not impossible to replicate in a calculated field in your data source.

Currently, however, unlike calculated fields, you can't edit the formulas of running calculations.

Work with data source fields

Dates in data sources

Was this article helpful?
How can we improve it?