---
schema_version: "1"
id: 0f7782d0b51534e86a9e39c5ebe484b169a032406f9b7e812758d1470fa74410
title: SAQL Null Measures and Dimensions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/reference/bi-saql-null-measures-and-dimensions.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-null-measures-and-dimensions.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7438a8a93c5ac0cd489b0f5e4b99694eb810a02370515fffb6a7b3a3b6b063e2
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# SAQL Null Measures and Dimensions

With CRM Analytics, you can use null measure handling to add null as the default value for numeric columns in datasets. Use null dimensions to return grouped null values from your SAQL queries.

## Measures

With null measure handling, you can specify null as the default value for numeric columns in recipes, dataflows, and CSV uploads. When another default value isn’t specified for a numeric column, null measure handling allows CRM Analytics to replace a blank value with a null value. Null support in measures doesn’t require extra indexing.

To enable this setting, from Setup, in the Quick Find box, enter `Analytics`, select **Settings**, and then select **Allow null measure handling in datasets**. If CRM Analytics was initially set up in your org after the Spring ’17 release, this setting is enabled by default and you can’t disable it.

## Dimensions

You can include null dimensions in your datasets. When a record’s dimension or date field is left blank, it appears as a hyphen in explorer and dashboard designer charts and tables. Previously, SAQL queries were limited to non-null values. For non-grouping queries we return null keys regardless of whether the setting is enabled. This feature is distinct from the null handling for measures preference.

To enable this setting, from Setup, in the Quick Find box, enter `Analytics`, select **Settings**, and then select **Include null values in CRM Analytics queries**. Then, refresh your datasets. To return grouped null values in your queries, select the null handling for dimensions preference in Setup.

Here’s an example of using the SAQL group-by function with the null handling preference enabled.

```nolang
q = load "Superstore";
        q = group q by 'Sub_Category';
        q = foreach q generate 'Sub_Category' as 'Sub_Category', count() as 'count';
        q = order q by 'Sub_Category' asc nulls first;
        q = limit q 2000;
```
