---
title: "How to use functions with custom fields"
slug: "how-to-use-functions-with-custom-fields"
description: "Transform your data with custom functions: calculate CTR, normalize text, and convert currencies for actionable insights. Unlock your data's potential!"
updated: 2026-04-22T08:31:14Z
published: 2026-04-22T08:31:14Z
---

> ## 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 use functions with custom fields

Functions allow you to transform one field or column with a custom rule. With plenty of functions available, custom fields equips you with the tools needed to transform your data into meaningful, actionable insights.

Some popular use cases include:

- **Evaluating campaign effectiveness**: Select 'Divide' as your function. Define 'Clicks' as your dividend and 'Impressions' as your divisor to calculate the CTR of your ad campaign. Multiply the result by 100 to get a percentage.
- **Normalizing text data**: To standardize text data, select either 'Lower case', 'Upper case', or 'Uppercase first letter', depending on your needs. Specify the text field to apply the function to.
- **Converting currencies**: Select 'Currency Conversion'. Then, specify the currency you're converting from, the currency you're converting to, and the field containing the amounts to convert (typically your ad spend data). Make sure to select a date for the exchange rate. You can also map the exchange rate to the date field to get historical currency conversion rates for each conversion.

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

These are just a few examples of what's possible with functions in custom fields. [See this article for a full list of available functions](/v1/docs/reference-guide-custom-fields-functions). Note that if you're using regex in your custom fields, the indexing defaults to 0 instead of 1.

Keep in mind that these functions can be [combined with other transformation steps](/v1/docs/how-to-add-multiple-transformation-steps-to-custom-fields) for more complex transformations.

## 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. For instance, if you're looking to calculate Click-Through Rate (CTR), you'd be working with metrics ('Clicks' and 'Impressions').
4. Select the data source you want to apply a transformation to and click **Next**.
5. Select **Function** as your transformation type. This selection enables you to manipulate your selected data using a variety of mathematical or textual operations.
6. From the list of available functions, select the one that best suits your needs.

Each function exposes specific fields that you'll need to configure according to your use case. For example, if you selected 'Divide', you'll need to specify the 'Dividend' (the number to be divided) and 'Divisor' (the number to divide by) fields.
7. After configuring your function, click **Next**.
8. Give a name for your custom field.
9. 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).

## More resources

- [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 add multiple transformation steps to custom fields](/v1/docs/how-to-add-multiple-transformation-steps-to-custom-fields)
- [How to use AI features with custom fields](/v1/docs/how-to-use-ai-features-with-custom-fields)
