---
schema_version: "1"
id: 7975511488575ae7c98ff412f908d2eaa34c8124da1def13bffcf1ef5a4135f2
title: Write a Formula in a Calculated Field
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/c360_a_sl_calc_fields_formula_build.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_formula_build.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 780fabc2dd80eb50ebe2df982b363a38a6193171750a069052f80d2ce5f02d2b
description: Formulas define how a calculated field is computed. How a formula is written is called its syntax. A formula may contain functions, fields, operators, literal expressions, parameters, or comments.
products:
  - Data 360
release: "264"
---
# Write a Formula in a Calculated Field

Formulas define how a calculated field is computed. How a formula is written is called its syntax. A formula may contain functions, fields, operators, literal expressions, parameters, or comments.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: All editions supported by <span>Data 360</span>. See <a href="https://help.salesforce.com/s/articleView?id=data.c360_a_dc_editions.htm&amp;language=en_US" target="_blank"><span>Data 360</span> edition availability</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d10822e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d10822e63 ">To build a formula:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d10822e63 ">
              <p>Permission set: </p>
              <ul>
                <li>Data Cloud Architect</li>

              </ul>
              <p>AND</p>
              <p style="margin-bottom:0;">Semantic Models object</p>
            </td>

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

1. In Data Cloud, on the Semantic Layer tab, select a data model.
2. Open the New Calculated Field or Edit Calculated Field window:
    1. From the **New** dropdown, select **Calculated Field**. Or,
    2. Select a calculated field in the left pane.
3. Configure the field [settings](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_calc_field_settings.htm&release=264.0.0&type=5 "Like all fields, calculated fields have a field type of dimension or measure. Depending on the field type, calculated fields have additional field settings or metadata to be configured, such as data role, aggregation type, or sentiment.").
4. In the calculated field window, click the Formula box.
5. Write your formula. You can type out exactly what you want or insert a [function](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_formula_functions.htm&release=264.0.0&type=5 "Tableau semantics supports various functions in different categories.") or field.
    1. To insert a function, click the **Functions** tab and expand the appropriate section. Select the function that you want to use and click **Insert**. Replace the placeholder syntax as appropriate.
    2. To insert a field, click the **Field** tab and expand the appropriate data object. Select the field that you want to use and click **Insert**.
6. Validate your formula to check for errors.
7. Save the calculated field.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-semantics-264-0-0-production-enus/f7c99ab1-3439-4722-b925-34cb47455d89/images/icon_note.png)

Note If the formula refers to multiple data objects, the calculated field appears under Calculated Fields in the left pane. If the formula refers to a single data object, the calculated field appears as a field in that data object — expand the object to view it.