---
schema_version: "1"
id: 799d90ace8a508cd351fbb26b7f2cad9dea6b165a3a620e7e0250035873f61b8
title: computeExpression Parameters
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_saql_transformation_operation.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_saql_transformation_operation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e17b61e9752b2943d6642bf9e52fa2212a975d4d7d3c8416ebfe475ab93ba817
description: When you define a computeExpression transformation, you set the action attribute to computeExpression. You also specify the parameters for the input source and the expression used to generate the values.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# computeExpression Parameters

When you define a computeExpression transformation, you set the action attribute to `computeExpression`. You also specify the parameters for the input source and the expression used to generate the values.

## Parameters

You can specify parameters in the following sections of the computeExpression node: parameters and computedFields.

This table describes the parameters in the `parameters` section.

  
| Parameter | Required? | Value |
| --- | --- | --- |
| source | Yes | Node in the dataflow definition file that identifies the input source for this transformation. |
| mergeWithSource | No | Indicates whether the input fields are included with the derived fields in the resulting dataset. When true, the resulting dataset contains all input fields from the source and the newly generated derived fields. When false, the resulting dataset contains the derived fields only. Default is true. |
| computedFields | Yes | Attributes and expression used to generate derived fields in the dataset. |

## computedFields

This table describes the attributes in the `computedFields` section. It also describes optional attributes that you can provide to override the field metadata to make the data appear differently in a dataset. For example, CRM Analytics can replace null values in a field with a default value.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:25%">
          <col style="width:12.5%">
          <col style="width:62.5%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d58179e131">Attribute</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d58179e134">Required?</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d58179e137">Value</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">name</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">API name of the generated field. The API names must be unique. Otherwise, the
              dataflow fails to run.</td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__type_fieldattribute"><a name="bi_integrate_saql_transformation_operation__type_fieldattribute"><!-- --></a>type</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>CRM Analytics field type associated with the field. Valid types are Text,
                Numeric, or Date. </p>
              <div>
                <p>Example:
                </p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>"type": "Text"</code></pre>
              </div>
            </td>

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

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">The display name of the generated field that appears in the CRM Analytics user
              interface. Can be up to 255 characters. Defaults to input field name if not
              specified.</td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">saqlExpression</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>SAQL expression used to calculate the value for the derived field. The
                expression can be based on input fields or other derived fields in the
                transformation.</p>
              <div>
                <p>Example:
                </p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>"saqlExpression":"toDate(birth_day, "yyyy-M-d")"</code></pre>
              </div>
              <p>If
                a field name in a SAQL expression contains characters other than letters, numbers,
                or underscores, enclose the name in single quotes. For example, field names
                resulting from an augment are prefixed with the relationship name and a dot, and
                must be. enclosed in single
                quotes.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>"saqlExpression":"'AccountId.Sales_Q4__c'-'AccountId.Sales_Q3__c'"</code></pre>
              <p style="margin-bottom:0;">The
                use of multivalue fields as input fields isn’t supported.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">format</td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes (for Date fields only)</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">Format of the derived date field. For information about formats, see the <a href="https://developer.salesforce.com/docs/analytics/bi-dev-guide-ext-data/guide/bi-ext-data-schema-reference.html" target="_blank">Analytics External Data Format Developer
                Guide</a>.</td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__fiscalMonthOffset_fieldattribute"><a name="bi_integrate_saql_transformation_operation__fiscalMonthOffset_fieldattribute"><!-- --></a>fiscalMonthOffset</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>For date fields only. The difference, in months, between the first month of the
                fiscal year and the first month of the calendar year (January). For example, if the
                fiscal year starts in January, the offset is 0. If the fiscal year starts in
                October, the offset is 9.</p>
              <p>Example:</p>
              <p><code>"fiscalMonthOffset": 9</code></p>
              <p>When you set <code>fiscalMonthOffset</code> to a value other than 0, CRM Analytics generates
                fields to show the fiscal week, month, quarter, and year that a date value falls
                in. You can use these fields to group and filter by fiscal period in a
                dataset.</p>
              <p style="margin-bottom:0;">CRM Analytics doesn’t support fields with
                different <code>fiscalMonthOffset</code> values in the
                same dataset. Using different <code>fiscalMonthOffset</code> values can produce unexpected results when you
                filter by relative fiscal date ranges. We recommend that you set the same value
                for all <code>fiscalMonthOffset</code> attributes in a
                dataset.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__isYearEndFiscalYear_fieldattributes"><a name="bi_integrate_saql_transformation_operation__isYearEndFiscalYear_fieldattributes"><!-- --></a>isYearEndFiscalYear</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>For date fields only, when <code>fiscalMonthOffset</code> is greater than 0. Indicates whether the fiscal year
                is the year in which the fiscal year ends or begins. Because the fiscal year can
                start in one calendar year and end in another, you specify which year to use for
                the fiscal year.</p>
              <ul>
                <li>If true, then the fiscal year is the year in which the fiscal year ends. The
                  default is true.</li>

                <li>If false, then the fiscal year is the year in which the fiscal year
                  begins.</li>

              </ul>
              <p>Example:</p>
              <p>
                <code>"isYearEndFiscalYear":
                  true</code>
              </p>
              <p style="margin-bottom:0;">CRM Analytics doesn’t support fields with
                different <code>isYearEndFiscalYear</code> values in the
                same dataset. Using different <code>isYearEndFiscalYear</code> values can produce unexpected results when you
                filter by relative fiscal date ranges. We recommend that you set the same value
                for all <code>isYearEndFiscalYear</code> attributes in a
                dataset.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__firstDayOfWeek_fieldattributes"><a name="bi_integrate_saql_transformation_operation__firstDayOfWeek_fieldattributes"><!-- --></a>firstDayOfWeek</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>For date fields only. The first day of the week for the calendar year and, if
                applicable, the fiscal year. Use 0 to set the first day to be Sunday, 1 to set the
                first day to be Monday, and so on. Use -1 to set the first day to be on January 1.
                The default is -1.</p>
              <p>Example:</p>
              <p><code>"firstDayOfWeek":
                  0</code></p>
              <p style="margin-bottom:0;">CRM Analytics doesn’t support fields with different <code>firstDayOfWeek</code> values in the same dataset. Using
                different <code>firstDayOfWeek</code> values can produce
                unexpected results when you filter by relative week date ranges. We recommend that
                you set the same value for all <code>firstDayOfWeek</code>
                attributes in a dataset.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__precision_fieldattribute"><a name="bi_integrate_saql_transformation_operation__precision_fieldattribute"><!-- --></a>precision</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes (for Numeric fields only)</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>The maximum number of digits in a numeric value, or the length of a text value.
                For numeric values: Includes all numbers to the left and to the right of the decimal
                point (but excludes the decimal point character). Value must be from 1 to 16. For
                text values: Value defaults to 255 characters, and must be from 1 to 32,000
                characters.</p>
              <div>
                <p>Example:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code> "precision": 10</code></pre>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__scale__fieldattribute"><a name="bi_integrate_saql_transformation_operation__scale__fieldattribute"><!-- --></a>scale</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">Yes (for Numeric fields only)</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>The number of digits to the right of the decimal point in a numeric value. Must
                be less than the precision value. Value must be from 1 to 15
                characters.</p>
              <div>
                <p>Example:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>"scale": 2</code></pre>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e131 ">
              <span id="bi_integrate_saql_transformation_operation__defaultValue_fieldattribute"><a name="bi_integrate_saql_transformation_operation__defaultValue_fieldattribute"><!-- --></a>defaultValue</span>
            </td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e134 ">No</td>

            <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d58179e137 ">
              <p>For text and numeric fields that can be null. Default value that replaces a
                null value for the specified field. Enter the default value as a
                string.</p>
              <div>
                <p>Example:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code> "defaultValue": "0"</code></pre>
              </div>
            </td>

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

#### See Also

- [computeExpression Transformation](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_saql_transformation.htm&release=264.0.0&type=5 "The computeExpression transformation enables you to add derived fields to a dataset. The values for derived fields aren’t extracted from the input data source. Instead, CRM Analytics generates the values using a SAQL expression, which can be based on one or more fields from the input data or other derived fields. For example, you can use an expression to assign a value to a field, concatenate text fields, or perform mathematical calculations on numeric fields.")