---
schema_version: "1"
id: f09b4b47c095179d9d4b8747bf97d6d8c4b41efd00b84235cca70f2adf5a1f36
title: Create a Derived Dimension
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-derived-dimension.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-derived-dimension.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 703ea272c6cd8dc3ebd6a6be1722431b809b5cd34749735092dbe5bdc76ad1f0
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# Create a Derived Dimension

Perform string manipulations on existing dimensions to create a new, or derived, dimension.

CRM Analytics creates derived dimensions at run time.

**note:** You can also create a derived dimension in a dataflow rather than at runtime.

## Example - Create a Field with City and State

Suppose that you have an Opportunities dataset with a City and a State field. You want to create a single field containing both city and state. Use SAQL to create a derived dimension.

```nolang
q = load "Ops";
q = foreach q generate 'Account' as 'Account', 'Amount' as 'Amount', 'City' + "-" + 'State' as 'City - State';
```

The resulting table contains city and state in the same field.

![Derived dimension shows time to win](https://developer.salesforce.com/media/bi_dev_guide_saql/bi_saql_derived_dimension.png)
