Help Center

| Submit or View Help Requests | Developer Docs |
| |

Set Up a Calculated Field

Calculated fields enable you to track events as they come in, set up a calculation using event fields, and store the resulting data on a participant’s profile. Once the calculated field is set up, its value will update dynamically as you send us events that meet your criteria.

This guide will show you the basic process for setting up a calculated field, including an example at the end. For more details about how calculated fields work and what types of calculations are possible, see our article on calculated fields.

Set up a calculated field

  1. In the left navigation menu, select Data Sources → Fields.

  2. Select Create calculated field.

  3. Complete the fields:

    • Name

    • Event

    • Calculation

    • Event field (if applicable for your calculation)

  4. Apply an optional tracking window if you want to perform a sum or count calculation on a rolling basis. The time zone for your account will apply to the tracking window.


    For details about the window types and when to use them, see Tracking Windows for Calculated Fields.

  5. If you applied a sliding window, then you can set a maximum value to be counted for each unit of your interval (e.g., each day in a 60 day interval).

  6. Add an optional active period if you want to set a start and end date for the calculation.

  7. Add filters if you only want events that meet specific criteria to be included in the calculation.


    Filters can apply to event characteristics (e.g., revenue amount for a given purchase) or user characteristics (e.g., a count of the number of times a participant makes a purchase over $100)

  8. Review your selections and decide if you want to backfill the values for all participants.

  9. Save your changes.


You have a referral program and want to reward participants who frequently make sizable purchases soon after they’ve been referred. You determine that for your program, this means any participant who makes 3 or more purchases of at least $50 in the month after the referral starts. A calculated field can help you determine which of your participants meet this threshold and act as the basis for a program rule that issues these participants a reward.

Setup instructions

Here’s how the calculation can be set up:

  1. Under the Calculation heading, complete the Name field.

  2. Enter the following values for the event and calculation fields:

    • Event: Purchase

    • Calculation: Count


      This will set up the calculation to count how many times we receive purchase events that meet your criteria.

  3. Apply a fixed tracking window. This will cause the calculation to reset each month.

    • Select Fixed Window.

    • Select a 1 calendar month window duration.

  4. Add a filter to specify that you only want to count the purchase events with a value of $50 or more:

    • Select Add Rule.

    • For the first Condition angle-down-solid.svg [Dropdown Menu], select the events.fields.revenue field.

    • Change the operator type to greater than or equal to.

    • Enter 50 as the string variable value.


    JSONata expressions only accept whole numbers. When using currency, we recommend using the lowest denomination used in your database configuration. If you’re not sure, contact our Support team for help.

  5. Review and save.

Did you find it helpful? Yes No

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