---
schema_version: "1"
id: 142cfbc1f0ac51c2e2095390cdc2df347e19652b3d864096a166dfc6926293af
title: Measures and Derived Measures in XMD
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_xmd/guides/reference/bi-xmd-reference-measures.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/guide/bi-xmd-reference-measures.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f97c6312cd5f4717b3a55a37b5b4a99550d086996b282c3e1e5c71175419c81b
products:
  - Analytics Extended Metadata (XMD) Developer Guide
  - analytics
---

# Measures and Derived Measures in XMD

You can specify the format and multiplier for each measure. The XMD parameters are the same for measures and derived measures.

This XMD snippet shows the parameters used with the `measures` XMD parameter.

```nolang
"measures": [
  {
    "description" : "Amount",
    "field" : "Amount",
    "format" : {
      "customFormat": "[\"$###0\",1]",
        "delimiters": "{}"
    },
    "label" : "Amount",
    "showInExplorer" : true
  }
],
```

The `measures` and `derived measures` sections can have the following parameters.

| Parameter      | Description                                                                                                                                                                                                                                                                                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| customFormat   | Specifies the format and multiplier of the measure or derived measure. `"customFormat": "[format,multiplier]"` For more examples, see [Format Fields and Field Values with XMD](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-formatting-dataset-fields-and-values.md).                                                                                                |
| delimiters     | Allows custom delimiters to be specified for the decimal separator (.) and the thousands separator (,). Custom delimiters will replace the default delimiter values for the final formatted result. Custom delimiters are not honored in CSV downloads. Example: `"delimiters": {"thousands": ".", "decimal": ","}`                        |
| description    | Description of the dataset field, no more than 1,000 characters. Example: `"description": "Total value for the opportunity."`                                                                                                                                                                                                              |
| field          | Identifier for the dataset field, which is the API name.                                                                                                                                                                                                                                                                                   |
| format         | Contains the `customFormat` and the `delimiters` parameters used to format the measure.                                                                                                                                                                                                                                                    |
| label          | Display name for the dataset field, up to 40 characters. Example: `"label": "Sales Amount"`                                                                                                                                                                                                                                                |
| showInExplorer | (Boolean) Indicates whether the dataset field can be selected from the dashboard designer or explorer when creating dashboards and lenses. Even if `showInExplorer` is `false`, you can still use the field for SAQL queries, manually adding it in JSON, and accessing it using the Analytics REST API. Example: `"showInExplorer": true` |

The `customFormat` parameter uses the following values.

## format

Format of the measure or derived measure. You can add a prefix, suffix, grouping separator, decimal separator, and leading and trailing zeros. You can also configure the number of digits. You can include any characters in prefixes and suffixes, such as minus signs or currency symbols.

Use the following symbols to specify the format.

- `0`—One digit. Use to add leading or trailing 0s. For example, when you apply the custom format `#,###.00` to 56375, the result is 56,375.00.
- `#`—Adds zero or one digit. Use to show digits when applicable. For example, when you apply the custom format `#,###.##` to 56375.56, the result is 56,375.56.
- `.`—Decimal separator, like in the number 375.56. The default separator is the decimal symbol (.) A custom separator can be defined in `delimiters` using the `decimal` attribute. The custom separator replaces the (.) for the final formatted result.
- `,`—Grouping separator, like in 56,375. The default separator is the comma symbol (,). A custom separator can be defined in `delimiters` using the `thousands` attribute. The custom separator replaces the (,) for the final formatted result.

Example: `"customFormat": "[\"-$#,###.00$\",1]"`

## multiplier

Changes a field's values by the same factor—like multiplying by 100 to convert decimals to percents. The multiplier must be a positive number.

Example: `"customFormat": "[\"#,###\",100]"`

**See Also**

- [Change Display Labels for Dataset Fields and Values](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-change-labels.md)
- [Change the Label for the Row Count Measure](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-change-count-measure.md)
- [Hide Dataset Fields from Lens and Dashboard](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-show-dataset-fields.md)
- [Multiply Measures by a Fixed Amount](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-multiply-by-fixed-amount.md)
- [Format Measures](https://developer.salesforce.com/docs/analytics/bi-dev-guide-xmd/concept/bi-xmd-format-currency.md)
