Open navigation

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

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. 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 for more complex transformations.


  1. On the Supermetrics Hub, go to Transformations → Custom fields.
  2. Click Create 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.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.