﻿ Google Data Studio Calculated Fields Tutorial - Optimize Smart

# Google Data Studio Calculated Fields Tutorial My step-by-step blueprint for using Looker Studio (formerly Google Data Studio)

### Get the FREE ebook on Looker Studio (75 Pages)

Last Updated: December 10, 2022

Note: Google Data Studio is now known as Looker Studio.

## What is a calculated field in Looker Studio?

It is a field that performs certain action(s) on another field(s) in your data source schema or chart via a formula.

These actions could be:

• Arithmetic and math operations
• Manipulating text, date and geographic information
• Using branching logic to evaluate data

Through calculated fields, you can create new metrics and dimensions in Looker Studio.

## Types of Looker Studio calculated fields

Looker Studio Calculated fields can be further categorized into:

1. Data source schema specific calculated fields
2. Chart specific (or chart level) calculated fields

Data source schema specific calculated fields can be further categorized into:

1. Data source schema specific calculated dimensions
2. Data source schema specific calculated metrics

Chart specific calculated fields can be further categorized into:

1. Chart specific calculated dimensions
2. Chart specific calculated metrics

## Data source schema specific calculated field

This is a calculated field created in a data source schema.

When you create a calculated field in a data source schema, the calculated field is available in any report that uses that data source schema.

A Looker Studio report which uses multiple data source schemas is based on multiple data sources:

Note: You can’t use a data source specific calculated field with blended data.

## Chart specific (or chart level) calculated field

It is the calculated field created in a specific chart in a report.

When you create a calculated field in a chart, the calculated field is available only in the chart in which you create it. However, you can use a chart specific calculated field with blended data.

Note: When using a chart specific calculated field, you cannot reference other chart-specific calculated fields in your formula, even if those fields are defined in the same chart. If you want to reference other calculated fields, use a data source schema specific calculated field.

## Data source schema specific calculated dimension

It is the dimension that performs certain action(s) on another field(s) in your data source schema via a formula.

When you create a calculated dimension in a data source schema, the calculated dimension is available in any report that uses that data source schema.

Note: All calculated dimensions appear in the data source schema with an ‘fx’ symbol.

## Data source schema specific calculated metric

It is the metric that performs certain action(s) on another field(s) in your data source schema via a formula.

When you create a calculated metric in a data source schema, the calculated metric is available in any report that uses that data source schema.

Note: All calculated metrics appear in the data source schema with an ‘fx’ symbol.

## Chart specific calculated dimension

It is the dimension that performs certain action(s) on another field(s) in your chart via a formula.

When you create a calculated dimension in a chart, the dimension is available only in the chart in which you create it. However, you can use a chart specific calculated dimension with blended data.

## Chart specific calculated metric

It is the metric that performs certain action(s) on another field(s) in your chart via a formula.

When you create a calculated metric in a chart, the metric is available only in the chart in which you create it. However, you can use a chart specific calculated metric with blended data.

## How to identify calculated fields

All calculated dimensions appear in the data source schema editor with an ‘fx’ symbol:

All calculated metrics appear in the data source schema editor with an ‘fx’ symbol:

## How to identify calculated fields in a report editor

The data source schema specific calculated fields do not appear with an ‘fx’ symbol in a report editor.

However, the chart specific calculated fields do appear with an ‘fx’ symbol when you hover your mouse them.

The following screenshot shows the data source schema specific calculated field called ‘[NEW] Is Revenue > Forecasted Revenue‘ in a report editor:

So if the calculated field is created in a data source schema then you can not easily identify it in the report editor.

But if the calculated field is created in a specific chart then you can identify it by hovering your mouse over the edit section of the field:

## Editing a calculated field

In order to edit a data source schema specific calculated field, follow the steps below:

Step-1: Navigate to the data source schema editor whose calculated field you want to edit.

Step-2: Click on the ‘fx’ icon next to the calculated field:

You would now see the calculated field editor through which you can edit your calculated field:

Step-3: Make changes to the formula of your calculated field and then click on the ‘Update’ button:

In order to edit a chart specific calculated field, follow the steps below:

Step-1: Navigate to the report which includes the chart that contains your calculated field.

Step-2: Select the chart (by clicking on it) whose calculated field you want to edit:

Step-3: Find your calculated field in the properties panel:

Step-4: Hover your mouse over the ‘AUT’ symbol. If it changes into the ‘fx’ icon then it means it is a chart specific calculated field:

Step-5: Click on the ‘fx’ icon. You would now see the calculated field editor through which you can edit your calculated field:

Step-6: Make changes to the formula of your calculated field and then click on the ‘Apply’ button:

Step-7: Click anywhere on the canvas to hide the dialog box.

## Calculated fields data types

By default, the data type assigned to a calculated field depends upon the type of operation(s) it performs on another field(s) in your data source schema or chart.

If your calculated field performs an arithmetic operation on another field(s) then it returns data of type ‘number’. So the data type assigned to the calculated field would be ‘Number’.

For example, consider the following calculated field:

Here the data type assigned to the calculated field ‘Tax+Shipping‘ is ‘Number’. And that is because the calculated field performs an arithmetic operation on two numeric fields ‘Tax‘ and ‘Shipping‘:

Consider another calculated field:

Here the data type assigned to the calculated field ‘Maximum Sales‘ is ‘Number’.  And that is because the calculated field uses a function (called MAX) that returns a value of type number:

If your calculated field performs a boolean operation on another field(s) then it returns data of type ‘boolean’. So the data type assigned to the calculated field would be ‘boolean’.

For example, consider the following calculated field:

Here the data type assigned to the calculated field ‘[NEW] is Revenue > Forecasted Revenue‘ is ‘Boolean’. And that is because the calculated field performs a boolean operation:

Similarly, if your calculated field performs a text operation on another field(s) then it returns data of type ‘text’. So the data type assigned to the calculated field would be ‘text’.

## Changing the data type of data source schema specific calculated field

You can change the data type of your data source schema specific calculated field by using the ‘Type’ drop-down menu in the data source schema editor:

## Changing the data type of chart specific calculated field

To change the data type of your chart specific calculated field follow the steps below:

Step-1: Navigate to the report which includes the chart that contains your calculated field.

Step-2: Select the chart whose calculated field data type you want to change:

Step-3: Find your calculated field in the properties panel:

Step-4: Hover your mouse over the ‘AUT’ symbol. If it changes into the ‘fx’ icon then it means it is a chart specific calculated field:

Step-5: Click on the ‘fx’ icon. You would now see the calculated field editor through which you can edit your calculated field:

Step-6: Click on the ‘Type’ drown menu and then select the new data type for your chart specific calculated field:

Step-7: Click anywhere on the canvas to close the dialog box.

## Changing the data type of your calculated field to incompatible data type

Consider the following calculated field of type ‘number’:

You can change the data type of the ‘Tax+Shipping’ calculated field to ‘currency’ without any issue. That is because the currency is also a type of number and hence is of the compatible data type.

But what if you change the data type of the ‘Tax+Shipping’ calculated field to ‘Boolean’:

In that case, your report will throw a system error as ‘Boolean’ data type is not compatible with the ‘Number’ data type:

Note: Ideally, you should not change the data type of your calculated field. But if you have to then make sure that the new data type is compatible with the existing data type. You would know that your new data type is not compatible when your report shows a system error.

## "How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."

Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

​#7 How to learn and master digital analytics and conversion optimization in record time.

## My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

### Himanshu Sharma • Founder, OptimizeSmart.com
• Over 15 years of experience in digital analytics and marketing
• Author of four best-selling books on digital analytics and conversion optimization
• Nominated for Digital Analytics Association Awards for Excellence
• Runs one of the most popular blogs in the world on digital analytics