Google Data Studio Calculated Fields Tutorial
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:
- Data source schema specific calculated fields
- Chart specific (or chart level) calculated fields
Data source schema specific calculated fields can be further categorized into:
- Data source schema specific calculated dimensions
- Data source schema specific calculated metrics
Chart specific calculated fields can be further categorized into:
- Chart specific calculated dimensions
- 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.
Creating and using calculated fields in Looker Studio
Other articles on Looker Studio
- Looker Studio Alternative – Whatagraph
- Looker Studio Parameters explained with examples
- Looker Studio Number Formats / Data Types
- How to Change Language in Looker Studio
- Looker Studio Date Format and Time Explained
- Looker Studio Tutorial with FREE PDF ebook
- Looker Studio Functions, Formulas Tutorial
- How to work with the Boolean field in Looker Studio
- Looker Studio Page Navigation Tutorial
- Understanding Report Editor in Looker Studio
- Best practices for creating a report in Looker Studio
- How to share reports in Looker Studio
- Seven methods to create a new report in Looker Studio
- Looker Studio Report Tutorial
- How to invite people to view or edit a report in Looker Studio
- How to share the link of your report in Looker Studio
- Schedule email delivery of a report in Looker Studio
- How to download Looker Studio report as PDF
- How to embed a Looker Studio report on a website
- Guide to Data Types in Looker Studio
- Image function in Looker Studio
- Image Link data type in Looker Studio
- Image data type in Looker Studio
- Looker Studio Geo Map – Latitude Longitude
- Why You Should Avoid Using Functions and Calculated Fields in Looker Studio
- Working with the Text data type in Looker Studio
- The Data Set Configuration Error in Looker Studio
- Data Source Fields in Looker Studio – Tutorial
- Refresh data source schema fields in Looker Studio
- Looker Studio Data Sources – Tutorial
- Looker Studio Dimension vs Metric
- How to filter by email in Looker Studio
- Looker Studio – Sharing Data Sources (aka data source schema)
- Field editing in reports – Looker Studio
- Data Source Version History in Looker Studio
- Community Visualization Access in Looker Studio
- Understanding Data Source Credentials in Looker Studio
- Understanding Data Freshness in Looker Studio
- How to create and configure a data source in Looker Studio
- Looker Studio Aggregation Explained
- How to Edit a Calculated Field in Looker Studio
- Formula Rejection in Looker Studio
- Doing Basic Maths on Numeric Fields via Calculated Fields
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:
- Data source schema specific calculated fields
- Chart specific (or chart level) calculated fields
Data source schema specific calculated fields can be further categorized into:
- Data source schema specific calculated dimensions
- Data source schema specific calculated metrics
Chart specific calculated fields can be further categorized into:
- Chart specific calculated dimensions
- 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.
Creating and using calculated fields in Looker Studio
Other articles on Looker Studio
- Looker Studio Alternative – Whatagraph
- Looker Studio Parameters explained with examples
- Looker Studio Number Formats / Data Types
- How to Change Language in Looker Studio
- Looker Studio Date Format and Time Explained
- Looker Studio Tutorial with FREE PDF ebook
- Looker Studio Functions, Formulas Tutorial
- How to work with the Boolean field in Looker Studio
- Looker Studio Page Navigation Tutorial
- Understanding Report Editor in Looker Studio
- Best practices for creating a report in Looker Studio
- How to share reports in Looker Studio
- Seven methods to create a new report in Looker Studio
- Looker Studio Report Tutorial
- How to invite people to view or edit a report in Looker Studio
- How to share the link of your report in Looker Studio
- Schedule email delivery of a report in Looker Studio
- How to download Looker Studio report as PDF
- How to embed a Looker Studio report on a website
- Guide to Data Types in Looker Studio
- Image function in Looker Studio
- Image Link data type in Looker Studio
- Image data type in Looker Studio
- Looker Studio Geo Map – Latitude Longitude
- Why You Should Avoid Using Functions and Calculated Fields in Looker Studio
- Working with the Text data type in Looker Studio
- The Data Set Configuration Error in Looker Studio
- Data Source Fields in Looker Studio – Tutorial
- Refresh data source schema fields in Looker Studio
- Looker Studio Data Sources – Tutorial
- Looker Studio Dimension vs Metric
- How to filter by email in Looker Studio
- Looker Studio – Sharing Data Sources (aka data source schema)
- Field editing in reports – Looker Studio
- Data Source Version History in Looker Studio
- Community Visualization Access in Looker Studio
- Understanding Data Source Credentials in Looker Studio
- Understanding Data Freshness in Looker Studio
- How to create and configure a data source in Looker Studio
- Looker Studio Aggregation Explained
- How to Edit a Calculated Field in Looker Studio
- Formula Rejection in Looker Studio
- Doing Basic Maths on Numeric Fields via Calculated Fields
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 in Google Analytics and BeyondSECOND EDITION OUT NOW!
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.
Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.