---
title: "How to add multiple transformation steps to custom fields"
slug: "how-to-add-multiple-transformation-steps-to-custom-fields"
description: "Unlock advanced data manipulation with custom fields, layering functions and lookups for in-depth analysis and enhanced performance insights."
updated: 2026-04-22T08:29:44Z
published: 2026-04-22T08:29:44Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to add multiple transformation steps to custom fields

With custom fields, you can add multiple transformation steps to unlock advanced data manipulation opportunities. By layering functions, lookups, and conditions, you can create complex rules for manipulating your data and conduct in-depth analysis with deeper insights.

Use cases for adding multiple transformation steps include:

- **Data enhancement with functions and lookups**: Suppose your campaign names include a product category, but you wish to analyze performance by category. You can use a function to extract the category from the campaign name, then a lookup to map category codes to full category names. This enables you to evaluate performance by product category instead of individual campaigns.
- **Performance metric calculation and categorization**: You can calculate the cost per click (CPC) and categorize it as 'High', 'Medium', or 'Low'. Start with a function to calculate CPC (Ad Spend / Clicks), then add a condition to categorize the CPC based on your thresholds.
- **Data clean-up and transformation**: If your ad campaigns are missing key information, like the target country, a function can fill the missing country values with 'Not Specified'. Then, add a lookup transformation to convert the country codes to full country names, followed by a condition to flag campaigns targeting high-priority countries.
- **Data enrichment for advanced analysis**: Maybe you need to transform your ad spend into another currency, round to the nearest dollar, and flag any campaigns with spend over a set threshold. First, use a function to apply the currency conversion, add another function to round the result, and finally a condition to flag high-spending campaigns.

[Embedded content](https://www.youtube.com/embed/TnMG0Zb6C40?&amp;wmode=opaque)

[See this article for a full list of available functions](/v1/docs/reference-guide-custom-fields-functions).

## Instructions

1. On the [Supermetrics Hub](https://hub.supermetrics.com/), go to **Custom fields** under **Manage**.
2. Click **New custom field**.
3. Select either dimension or metric and click **Next**.This selection is based on the aspect of the data you aim to manipulate.
4. Select the data source you want to apply a transformation to and click **Next**.
5. Select your first transformation — function, lookup, or condition.
6. After you've configured your initial transformation, click **Add another transformation**. This allows you to apply another transformation to the result of the previous step.
  1. Select the type of your next transformation and configure it as necessary.
  2. Click **Add another transformation** to continue adding transformations until you’ve created the custom field you need.
  3. When done, click **Next**.
7. Give your custom field a name.
8. Click **Create custom field**.

You can now [use your new custom field in your reporting](/v1/docs/how-to-use-custom-fields-in-your-reporting).

> [!NOTE]
> Practical example
> 
> Let's set up a custom field to see the sessions for your Google Ads and Facebook Ads campaigns. In this example, all Google Ads campaigns start with a G and all Facebook Ads campaigns start with an F. In our report, we'd like all Google Ads campaigns to be labeled as originating from Google and all Facebook Ads campaigns as originating from Facebook.
> 
> To achieve this, we need two transformations. Here's what to do:
> 
> 1. Create a new custom field and make it a dimension.
> 2. Select the Google Analytics data source.
> 3. Create the first transformation that identifies the first letter of the campaign name:
>   1. Select **Function**, and select the **Split text and pick part** function.
>   2. Select the **Session campaign name** field as the input text.
>   3. Set delimiter as underscore, and set the part number as 1.
>   4. Click **Add another transformation**.
> 4. Create the second transformation that uses the result from the previous step to return the full name of the platform from which the data originates:
>   1. Select **Lookup**.
>   2. In the **Options**, select to Return new value if data **EQUALS** lookup value.
>   3. In the lookup table, set the values to look up and return. In this case, we want the lookup value G to return Google and lookup value F to return Facebook.
>   4. Name your custom field and save it.
> 5. Go to your data destination or set up a query or a transfer.
>   1. Select the Google Analytics data source.
>   2. Select the accounts and date range you want to pull data for.
>   3. Select the newly created custom dimension.
>   4. Select the **Sessions** metric.
>   5. Run the query.
> 
> The results show your data grouped by either Google, Facebook, or others.

## More resources

- [How to use functions with custom fields](/v1/docs/how-to-use-functions-with-custom-fields)
- [How to use lookups with custom fields](/v1/docs/how-to-use-lookups-with-custom-fields)
- [How to use conditions with custom fields](/v1/docs/how-to-use-conditions-with-custom-fields)
- [How to use AI features with custom fields](/v1/docs/how-to-use-ai-features-with-custom-fields)
