Documentation

Apply Custom Formula

Updated on

Nov 20, 2024

A Custom Formula is a way that allows you to quickly apply changes and modifications to data through a no-code interface. You can use Custom Formulas for a single column, a table, or an entire dataset. This feature enables you to easily create calculations that are automatically applied to the selected data.

Use Case 1: Configuring Calculations for a Single Table

Suppose you have a table where you want to change the calculation method for the revenue metric. You can set a new value for revenue by applying the following formula:

This means that for the data in the table, such as Google, the revenue value will be calculated as half of the total conversions (all conversions value / 2). This approach is applied only to the data in the specified table.

In addition to simple calculations, Custom Columns support more complex computations using Conditions and Fields, allowing you to customize calculations based on various criteria.

Imagine you need to set up dynamic determination of the Channel field value based on the type of ad network specified in the Ad Network Type field. Suppose you’re working with Google data and want the Channel field to automatically change depending on the Ad Network Type.

To achieve this, you create a series of conditions (Conditions) that will check the value in Ad Network Type and accordingly set the value for Channel.

  1. If Ad Network Type contains the word “Content,” then Channel will be set to “Content.” This means that if the ad network is related to content, the system will automatically assign “Content” to the Channel.
  2. If Ad Network Type contains the word “Search,” then Channel will be set to “Search.” In this case, if the ad network is related to search, the system will set “Search” as the value for Channel.
  3. If Ad Network Type contains the word “Search_Partners,” then Channel will be set to “Search_Partners.” Thus, for search partners, the corresponding value will be assigned.
  4. If none of the above conditions are met, Channel will be set to “Unknown”.

This process allows you to automatically classify channels based on the type of ad network in Google, ensuring accurate and dynamic assignment of values in the Channel field.

Use Case 2: Applying Changes to the Entire Dataset

If you want to apply a change to the revenue metric across the entire dataset, you’ll need to create a new column. Let’s call it revenue_custom.

As in the first example, you can apply a custom calculation like revenue / 2.

And unlike the example with Google, this column is now applied to the entire dataset, and it will calculate the custom revenue in other data sources.

Similarly to the single table example, you can create more complex calculations using Conditions and Fields. For instance, based on location.

  1. If the campaign name contains the word “US,” then Location will be set to “US.”
  2. If the campaign name contains the word “UK,” then Location will be set to “UK.”
  3. If the campaign name contains the word “CA” or “Canada,” then Location will be set to “CA.”
  4. If none of the above conditions are met, Location will be set to “Unknown Location.”

This process allows you to automatically determine the Location based on the campaign name for all data sources at once!

Here’s what it looks like in the data:

Preview and save

All formulas can be easily tested before applying them to the final model. You have a very handy tool — the Preview button.

Before applying the formula to the model, you can click on Preview to see how the data will look after the conditions are applied. This allows you to validate the correctness of the formula to ensure everything is set up as intended.

Only after you are confident in the accuracy of the changes, you can click Run and Save, which will update your model and apply all the changes.

Advanced

If you would like to explore how to apply custom functions in this formula, you can find detailed information in this document.

Schema information

Setup guide

Settings

No items found.

Troubleshooting

Troubleshooting guides

Check out troubleshooting guides for
Apply Custom Formula
here:

Limits

Frequently asked questions

No items found.
☶ On this page
Description
Related articles
No items found.
No items found.

Questions?

Improvado team is always happy to help with any other questions you might have! Send us an email.

Contact your Customer Success Manager or raise a request in Improvado Service Desk.