---
schema_version: "1"
id: 92c6988534d3b0f368ab87dad1e1c9a5e6be3371f452bb4ad71d139f178a1b4f
title: Use Calculated Fields
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.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 999f5b563ca0598f25de531278cf4390ed1ab5501bdab22d1377c041e2479a1a
description: If the underlying data doesn't include all the fields necessary for analysis, you can create fields by using calculations. These fields are called calculated fields. Calculated fields don’t physically exist in the database. They’re based around a formula and can include functions, operators, literals, or other inputs such as existing fields from your dataset.
products:
  - Data 360
release: "264"
---
# Use Calculated Fields

If the underlying data doesn't include all the fields necessary for analysis, you can create fields by using calculations. These fields are called calculated fields. Calculated fields don’t physically exist in the database. They’re based around a formula and can include functions, operators, literals, or other inputs such as existing fields from your dataset.

For example, consider a calculated field **Final Cost** that computes an item's final cost for a customer with the formula:

\[Price\]\*(1-\[Discount\])\*(1+\[Tax Rate\])

- The fields are in brackets: Price, Discount, and Tax Rate.
- The operators are multiplication (\*), subtraction (-), and addition (+).
- The numeral 1 is a literal.

Calculated fields can be dimensions or measures depending on their characteristics and use. Calculated dimensions are qualitative, categorical fields. Calculated measures are quantitative, numerical fields. In both cases, the formula is the crucial part of defining a calculated field. See [Formulas in Calculated Fields](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_formula.htm&release=264.0.0&type=5 "A formula tells the Tableau Semantics Query Generator how to calculate the fields when running queries. You can add logic on how to calculate raw data within the dimension or measure.").

![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

Calculated insights aren't quite the same thing. For more information, see [Calculated Insights](https://help.salesforce.com/s/articleView?id=data.c360_a_sl_calc_fields.htm&type=5&language=en_US).

## Calculated Dimensions

A calculated dimension is used to segment, classify, or group the data. Dimensions are typically discrete and often have a data type of text, boolean, date, datetime, URL, email, or phone number.

**Use cases:**

- **Consolidate dimensions**: If you have dimensions containing different pieces of information that are often used together you can concatenate them. For example, if there's a dimension for first name and a dimension for last name, you can combine them into a dimension for full name:
    
    - \[First Name\] + " " + \[Last Name\] to combine first and last name (with a space between them)
    - \[Last Name\] + ", " + \[First Name\] to combine them as last name comma first name (with a space after the comma)
- **Group dimensions**: If you have detailed values that you want to combine into categories, you can evaluate values and group them. For example, the following calculation takes five different types of book formats and groups them into two simple categories, paperback or hardcover:
    
    ```
    CASE [Book Format] 
    WHEN "Mass market paperback" THEN "Paperback" 
    WHEN "Trade paperback" THEN "Paperback" 
    WHEN "Paperback graphic" THEN "Paperback" 
    WHEN "Hardcover" THEN "Hardcover" 
    WHEN "Hardcover graphic" THEN "Hardcover" 
    END
    ```

## Calculated Measures

A calculated measure, like all measures, are aggregated. They're typically continuous and often have a data type of number, percentage, or currency. Since measures are aggregated, quantitative fields, they have additional metadata such as aggregation type, decimal place, data role, and sentiment.

**Use Case:**

- Key performance indicators (KPIs): If you have various metrics native to your data source, you can use a calculated measure to compute a rate based on those fields:
    
    - `SUM([Unique Email Opens]/SUM([Email Sends])` to define the Email Open Rate

- **[Create a Calculated Field](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_create.htm&release=264.0.0&type=5)**  
    Calculated fields are fields that don't exist in the underlying data and are defined with a formula. Calculated dimensions are qualitative, categorical fields used to group, classify, and segment data. Calculated measures are quantitative, numerical fields that are aggregated.
- **[Configure Calculated 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.
- **[Add Filters to a Calculated Field](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_add_filter.htm&release=264.0.0&type=5)**  
    Filters let you choose which data can be in the formula expression. Filters help you increase the accuracy of your measures.
- **[Filter Operators](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_data_type_oper.htm&release=264.0.0&type=5)**  
    Filter operators are used when creating filters in calculated fields.
- **[Delete a Calculated Field](https://help.salesforce.com/s/articleView?id=analytics.c360_a_sl_calc_fields_delete.htm&release=264.0.0&type=5)**  
    You can delete a calculated field from your semantic model.