---
schema_version: "1"
id: 062081e7ee95431e89a701a987cf3be16190a2926b328de82f8e80f2b1a7a4cf
title: Formula Operators
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_data_mapping_operators.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_data_mapping_operators.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e8e3771bcf47701694496a61b6a3dc641c0269dc856ab7c5ebcb5d8635eabcc5
description: A formula is a mathematical relationship or rule expressed in symbols. With Marketing Cloud Intelligence, you can use formulas to create calculated measurements and dimensions when mapping your data. Operators specify the type of calculation to perform on the terms in a formula—such as addition, subtraction, multiplication, or division.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Formula Operators

A formula is a mathematical relationship or rule expressed in symbols. With Marketing Cloud Intelligence, you can use formulas to create calculated measurements and dimensions when mapping your data. Operators specify the type of calculation to perform on the terms in a formula—such as addition, subtraction, multiplication, or division.

There are several types of formula operators available in Marketing Cloud Intelligence, as shown in the following tables:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Comparison Operators ">
      <caption>Comparison Operators </caption>
      <colgroup>
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e46">Operator Symbol</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e49">Operator Name </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e52">Description</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e55">Example</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">==</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Equal</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the values on both sides of the operator are equal.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>"Foo" == "Foo"</p>
            <p style="margin-bottom:0;"> is true</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">
            <p style="margin-bottom:0;">!=</p>
          </td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Not Equal</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the values on both sides of the operator are not equal.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>"foo" != "bar" </p>
            <p style="margin-bottom:0;">is true</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">
            <p style="margin-bottom:0;">&gt;</p>
          </td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Greater Than</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the value on the left side of the operator is greater than the value
            on the right.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>2 &gt; 1</p>
            <p style="margin-bottom:0;"> is true </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">&lt;</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Less Than</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the value on the left of the operator is less than the value on the
            right side. </td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>1&lt;2</p>
            <p style="margin-bottom:0;">is true </p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">&gt;=</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Greater Than or Equal to </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the value on the left side of the operator is greater than or equal to
            the value on the right side.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>1 &gt;= 1</p>
            <p> is true </p>
            <p>6 &gt;= 5</p>
            <p style="margin-bottom:0;">is true</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">&lt;=</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Less Than or Equal to</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the value on the left side is less than or equal to the value on the
            right.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">
            <p>2 &lt;= 2 </p>
            <p>is true </p>
            <p>2 &lt;= 3</p>
            <p style="margin-bottom:0;">is true</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">Contains</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Value Containment Check</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Checks to see if the value on the left contains the value on the right.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">“Foo” var contains "Foo"</td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e46 ">Soundslike</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e49 ">Soundex Check</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e52 ">Performs a <a href="https://en.wikipedia.org/wiki/Soundex" target="_blank">Soundex</a> comparison between two strings. Allows you to
            search by sound key, when you know the pronunciation but not the spelling.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e55 ">"foobar" soundslike "fubar"</td>

        </tr>
      </tbody>
    </table>

Logical Operators    
| Operator Symbol | Operator Name | Description | Example |
| --- | --- | --- | --- |
| && | Logical AND | Checks to see that the values on both sides of the operator are true. | foo && bar |
| || | Logical OR | Checks to see if either the value on the left or the right is true. | foo || bar |
| or | Logical OR | Checks a sequence of values for emptiness and returns the first non-empty value. (This operator, or at least its equivalent functionality, is referred to as the "elves operator" in other languages) | foo or bar or barfoo or 'N/A' |
| ~= | Regular Expression Match | Checks to see if the value on the left matches the regular expression on the right. | foo ~= '\[a-z\].+' |

Bitwise Operators    
| Operator Symbol | Operator Name | Description | Example |
| --- | --- | --- | --- |
| & | Bitwise AND | The & operator compares each binary digit of two integers and returns a new integer, with a 1 wherever both numbers had a 1 and a 0 anywhere else | Foo & 5 |
| | | Bitwise OR | The | operator compares each binary digit across two integers and gives back a 1 if either of them is 1. | Foo | 5 |
| ^ | Bitwise XOR | When calculating the resulting number, it again compares the binary digits of these numbers. If one or the other is a 1, it inserts a 1 into the result, otherwise, it will insert a 0. | Foo ^ 5 |

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Arithmetic Operators">
      <caption>Arithmetic Operators</caption>
      <colgroup>
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e447">Operator Symbol</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e450">Operator Name</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e453">Description</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e456">Example</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e447 ">+</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e450 ">Addition</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e453 ">
            <p>Adds the value on the left to the value on the right</p>
            <p style="margin-bottom:0;">Note: When Mapping it must be used in conjunction with the NUMBER() formula, as in the
              mapping, + is used for concatenation</p>
          </td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e456 ">
            <p>1 + 2</p>
            <p style="margin-bottom:0;">Returns: 3</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e447 ">-</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e450 ">Subtraction.</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e453 ">Subtracts the value on the right from the value on the left.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e456 ">
            <p>2 - 1</p>
            <p style="margin-bottom:0;">Returns: 1</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e447 ">/</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e450 ">Division</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e453 ">Divides the number on the left by the number on the right</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e456 ">
            <p>2 / 1</p>
            <p style="margin-bottom:0;">Returns: 2</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e447 ">*</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e450 ">Multiplication </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e453 ">Multiplies the number on the left by the number on the right</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e456 ">
            <p>2 * 1</p>
            <p style="margin-bottom:0;">Returns: 2</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e447 ">%</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e450 ">Modulus</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e453 ">Divides the number on the left by the number on the right and returns the
            remainder.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e456 ">
            <p>1 % 2</p>
            <p style="margin-bottom:0;">Returns: 1</p>
          </td>

        </tr>
      </tbody>
    </table> <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small " summary="Other Operators">
      <caption>Other Operators</caption>
      <colgroup>
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
        <col style="width:25%">
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e598">Operator Symbol</th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e601">Operator Name </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e604">Description </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d64594e607">Example </th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e598 ">+</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e601 ">String Concatenation</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e604 ">
            <p>Concatenation is the process of appending one string to the end of another string</p>
            <p style="margin-bottom:0;">Note: In Calculated Measurements, + is used for addition (see explanation in Arithmetic
              Operators)</p>
          </td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e607 ">
            <p>'foo' + 'bar'</p>
            <p style="margin-bottom:0;">Returns: 'foobar'</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e598 ">#</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e601 ">Concatenation Operator</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e604 ">Concatenates two literals as strings.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e607 ">
            <p>1 # 2 </p>
            <p style="margin-bottom:0;">returns: '12'</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Operator Symbol" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e598 ">=</td>

          <td data-label="Operator Name" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e601 ">Assignment</td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e604 ">Assigns the value on the right to the variable on the left.</td>

          <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d64594e607 ">var = 'foobar'</td>

        </tr>
      </tbody>
    </table>