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)

Yes I want the FREE ebook

 

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

Types of Google Data 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:

multiple data source schemas

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. 

data source specific dimension

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. 

data source specific metric

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. 

chart specific calculated

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. 

chart specific calculated metric

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:

calculated vs regular

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

calculated vs regular metric

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: 

new1

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:

net profit

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:

fx icon

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

formula field

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

update formula

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:

sample report

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

find calculated metric

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:

symbol change

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

edit formula

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

apply

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:

tax plus shipping

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‘:

tax plus shipping formula

Consider another calculated field:

maximum sales

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:

max revenue

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:

boolean

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:

forcasted revenue formula

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 data type
changing data type 1
data type changed

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:

max sales

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

metric

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:

maximum sales fx icon

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

calculated field editor 2 1

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

type
currency us dollar
currency set

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’:

tax plus shipping 1

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’:

false boolean data type

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

system error 1

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

  1. Looker Studio Alternative – Whatagraph
  2. Looker Studio Parameters explained with examples
  3. Looker Studio Number Formats / Data Types
  4. How to Change Language in Looker Studio
  5. Looker Studio Date Format and Time Explained
  6. Looker Studio Tutorial with FREE PDF ebook
  7. Looker Studio Functions, Formulas Tutorial
  8. How to work with the Boolean field in Looker Studio
  9. Looker Studio Page Navigation Tutorial
  10. Understanding Report Editor in Looker Studio
  11. Best practices for creating a report in Looker Studio
  12. How to share reports in Looker Studio
  13. Seven methods to create a new report in Looker Studio
  14. Looker Studio Report Tutorial
  15. How to invite people to view or edit a report in Looker Studio
  16. How to share the link of your report in Looker Studio
  17. Schedule email delivery of a report in Looker Studio
  18. How to download Looker Studio report as PDF
  19. How to embed a Looker Studio report on a website
  20. Guide to Data Types in Looker Studio
  21. Image function in Looker Studio
  22. Image Link data type in Looker Studio
  23. Image data type in Looker Studio
  24. Looker Studio Geo Map – Latitude Longitude
  25. Why You Should Avoid Using Functions and Calculated Fields in Looker Studio
  26. Working with the Text data type in Looker Studio
  27. The Data Set Configuration Error in Looker Studio
  28. Data Source Fields in Looker Studio – Tutorial
  29. Refresh data source schema fields in Looker Studio
  30. Looker Studio Data Sources – Tutorial
  31. Looker Studio Dimension vs Metric
  32. How to filter by email in Looker Studio
  33. Looker Studio – Sharing Data Sources (aka data source schema)
  34. Field editing in reports – Looker Studio
  35. Data Source Version History in Looker Studio
  36. Community Visualization Access in Looker Studio
  37. Understanding Data Source Credentials in Looker Studio
  38. Understanding Data Freshness in Looker Studio
  39. How to create and configure a data source in Looker Studio
  40. Looker Studio Aggregation Explained
  41. How to Edit a Calculated Field in Looker Studio
  42. Formula Rejection in Looker Studio
  43. Doing Basic Maths on Numeric Fields via Calculated Fields

Register for the FREE TRAINING...

"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.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#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.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#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 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.

About the Author

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
  • Consultant to countless small and big businesses over the decade

Get the FREE ebook on Looker Studio (formerly Google Data Studio) (75 pages)

X
error: Alert: Content is protected !!