---
schema_version: "1"
id: f46a613574fcff996dd1384ae77d1972ab53697c882d6421fb43c9e0b9f937ec
title: "CRM Analytics Quick Sort: Limitations and Guidance"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_dashboard_quick_sort_ltd.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_quick_sort_ltd.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a71e27fd117bfac9d6e4522d44727efa2fab07b7f8507604dc462639fb914f89
description: CRM Analytics offers a powerful quick sort feature, enabling users to sort data directly within table and chart widgets by clicking column headers. However, some query configurations can interfere with this functionality. This document outlines known limitations and provides best practices for effective use of the quick sort feature.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# CRM Analytics Quick Sort: Limitations and Guidance

CRM Analytics offers a powerful quick sort feature, enabling users to sort data directly within table and chart widgets by clicking column headers. However, some query configurations can interfere with this functionality. This document outlines known limitations and provides best practices for effective use of the quick sort feature.

## Where Quick Sort Isn't Supported

Quick sort is disabled in the following scenarios due to technical conflicts that may result in query failures.

- SAQL Queries with `union` statements
- SAQL Queries with `foreach` or `order` by containing bound interactions
    - Where selection bindings lead to changes in projected columns
    - Examples include `{{cell(...)}}` used in `foreach` or `order` clauses
- Fully Bound SAQL Queries
    - If key operations, such as `group`, `foreach`, or `order` are entirely bound, the system cannot reliably interpret or sort them
    - Partially bound queries support quick sort
- PIGQL Queries
    - Quick sort isn't supported due to the static nature of PIGQL
- Direct Queries (Salesforce/Snowflake/Data 360/Google BigQuery)
    - Quick sort doesn't support server-side sorting for these query types

Compact Forms

- Compact Form 1.0
    - When `subtotal` is enabled, it introduces implicit bindings that interfere with sorting

- Compact Form 2.0
    - When `columnTotal` is enabled and `group`, `columnTotal`, or `subtotal` contain any form of a binding

## Why These Limitations Exist

Previously, CRM Analytics included automatic quick sort detection. However, this feature prevented some valid use cases, especially utilizing advanced bindings. Examples include:

- Dependence on fully bound queries
- Previous attempts to enable partial support, such as disabling only when an order clause was bound, resulted in runtime errors, particularly when bindings dynamically altered projected columns

## Quick Sort Best Practices

- Use partially bound queries wherever possible if sorting is required
- Test quick sort behavior when changes are made to selection bindings, particularly within `foreach` or `order` by statements
- If you intend to use quick sort, don't fully bind entire SAQL operations such as `group`, `foreach`, or `order`

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_example.png)

Example

Works with Quick Sort:

```
q = group q by {{cell(Step.selection, 0, "groupField").toString()}};
q = foreach q generate q.'Industry' as 'Industry', count(q) as 'Count';
```

Fails with Quick Sort:

```
q = foreach q generate {{cell(Step.selection, 0, "projection").toString()}};
```

#### See Also

- [Add a Table Widget to Show Record Details and Create Calculated Columns](https://help.salesforce.com/s/articleView?id=analytics.bi_dashboard_widgets_table_add_flex.htm&release=264.0.0&type=5 "You can add different types of tables to a CRM Analytics dashboard. To view record-level details, add a values table. A values table can show details like how long a case has been open and who owns it. To create custom columns in a table based on calculations from existing fields, add a compare table. If the underlying query contains at least one grouping, you can create a pivot table.")