Chapter 4: Aggregation & Working with Numbers
4.6. Working with Numbers in Looker Studio
How do we transform data fields inside Looker Studio to create a new field from existing metrics and dimensions?
We can:
- Change Metrics
- Create New Metrics
- Clean & Normalize Data
- Group & Categorize Data
- Manipulate Data & Time
Creating New Metrics: Math Functions
One of the easiest ways to create a new metric using existing fields inside Looker Studio is to use mathematical functions.
In this lesson we will see how we can use math functions to create a new metric by aggregating existing metrics or converting a dimension into a metric.
Count & Count Distinct
How do we know how many event categories we have in Google Analytics? Or how many product categories our eCommerce client offers?
In this lesson we differentiate count from COUNT_DISTINCT() function in Looker Studio and see how we can turn a dimension into a metric using COUNT_DISTINCT()
Basic Math Operations
Let’s see how we can use basic math operations to create a new metric on chart level in Looker Studio.
In particular, we will demo how to create monthly metrics such as average monthly ad spend and monthly sales using the existing fields and math operations.
We will also cover how we can change the field type (such as applying a currency label) on a chart.
Order of Operations
Just like writing formulas in Google Sheets, we can use parentheses to enforce the order of operations or how we want Looker Studio to execute our computed field that uses more than one math function.
In this lesson we will also learn why it’s important to define our custom fields centrally so we can easily reuse them for any of our charts and edit them effortlessly when the desired formula changes.
📩 Receive my weekly Looker Studio tips
🖇 Connect with me on LinkedIn