---
schema_version: "1"
id: dffa4cf27affcdac8fc412eac1126189dbdc762a4f07d6dc59230793b4cbedb5
title: Notation for String Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_recipe_string_functions_notation.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_string_functions_notation.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d622847f6724b2c7234824859e5075e9b42c23ca3f62be89a3acc0c59ce88d63
description: In CRM Analytics, use formulas to create custom calculations. If you manually type your formulas, use single quotes ' for string literals and double quotes " for joined fields with dot notation or reserved keywords. If you use the recipe builder tool instead of typing, the correct single or double quote is automatically used.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Notation for String Formulas

In CRM Analytics, use formulas to create custom calculations. If you manually type your formulas, use single quotes `'` for string literals and double quotes `"` for joined fields with dot notation or reserved keywords. If you use the recipe builder tool instead of typing, the correct single or double quote is automatically used.

## Notation for String Formulas

Here are some examples of when to use single and double quotes. In the first example there are no quotes around **StageName**. In contrast, in the second example there are double quotes enclosing **"Opportunity.StageName"**, because the field has dot notation to indicate it’s joined data.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:22.98850574712644%">
          <col style="width:32.41379310344827%">
          <col style="width:44.59770114942529%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d49753e56">Character</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d49753e59">Description</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d49753e62">Example</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e56 ">
              <code>'</code>
            </td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e59 ">Single quote. Use for string literals, such as field values.</td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e62 ">
              <p>
                <samp class="parmname">case</samp>
              </p>
              <p>
                <samp class="parmname">when StageName = 'New'</samp>
              </p>
              <p>
                <samp class="parmname">then 'High'</samp>
              </p>
              <p>
                <samp class="parmname">else 'Low'</samp>
              </p>
              <p style="margin-bottom:0;">
                <samp class="parmname">end</samp>
              </p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e59 ">Double quote. Use for column names with dot notation. </td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e62 ">
              <p>
                <samp class="parmname">case</samp>
              </p>
              <p>
                <samp class="parmname">when "Opportunity.StageName"= 'New'</samp>
              </p>
              <p>
                <samp class="parmname">then 'High'</samp>
              </p>
              <p>
                <samp class="parmname">else 'Low'</samp>
              </p>
              <p style="margin-bottom:0;">
                <samp class="parmname">end</samp>
              </p>
            </td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e59 ">Double quote. Use for columns that share a name with reserved keywords. <span class="doc_external_link">More Info</span></td>

            <td data-label="Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d49753e62 ">
              <p>
                <samp class="parmname">case</samp>
              </p>
              <p>
                <samp class="parmname">when "month"= 'New'</samp>
              </p>
              <p>
                <samp class="parmname">then 'High'</samp>
              </p>
              <p>
                <samp class="parmname">else 'Low'</samp>
              </p>
              <p style="margin-bottom:0;">
                <samp class="parmname">end</samp>
              </p>
            </td>

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

#### See Also

- [String Functions for Formulas](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_stringfunctions.htm&release=264.0.0&type=5 "In CRM Analytics, use string functions to create values based on other strings. For example, you can change the casing of text strings, concatenate values from multiple columns, and replace values. The arguments for string functions must be text strings or fields.")