---
schema_version: "1"
id: 95a350375da2742a365a7a544e32e4645b1d0ac50a1bfac69ac98bfe8bbd360d
title: Null Values in Sorting Rules
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_null_values_in_sorting_rules.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_null_values_in_sorting_rules.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 50f369d4f4e13affaa5e370f071355c099cfbfa5bb041f645b9983e28f4f0387
description: For standard attributes, null values are handled identically for all data types in B2C Commerce. For dynamic attributes, configure whether you want a null value to be interpreted as a minimum, maximum, or average value using the dynamic attribute Default Value option.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Null Values in Sorting Rules

For standard attributes, null values are handled identically for all data types in B2C Commerce. For dynamic attributes, configure whether you want a null value to be interpreted as a minimum, maximum, or average value using the dynamic attribute Default Value option.

## Standard Attributes

If a sorting rule is based on a standard attribute, then null values are always added to the end of the result set, independent of the sorting direction.

Ascending values sort as:

1

2

3

null

null

Descending values sort as:

3

2

1

null

null

## Dynamic Attributes

To control how null values are sorted in dynamic attributes, set the Default Value for the attribute.

- Minimum
    
    Null values sort to the end of the result set, similar to the default behavior for standard attributes.
- Average
    
    Null values sort to the middle of the result set, as though the value was the average of all values. This is useful if you have incomplete data for some products, but don’t want a null value to automatically cause the product to be sorted to the end of the result set.
- Maximum
    
    Null values sort to the beginning of the result set. This is useful if you have new products with incomplete data, such as sales figures, that you want to promote