Loading

CRM Analytics: Waterfall Chart Crashes When Dynamic customDomain Binding Receives Null Value from Query with No Results

Fecha de publicación: Oct 8, 2026
Descripción

In Salesforce CRM Analytics, a Waterfall chart widget can crash when its Y-axis customDomain (min/max range) is set by a dynamic binding to a separate SAQL query, and a filter selection makes that query return no results. The chart bars disappear, only the numerical data remains visible, and the chart does not recover after you revert the filters. A full page refresh is required to restore it.

The binding uses .asString() serialization, such as max_WHB_Units_MTD_1. When the bound query returns no data, .asString() attempts to serialize null and causes the chart rendering engine to enter a permanent error state.

Solución

This article answers how to stop a CRM Analytics Waterfall chart from crashing when a dynamic customDomain binding receives a null value from a SAQL query that returns no results.

Switch the customDomain Binding from asString to asObject

Switch the customDomain binding serialization from .asString() to .asObject(). The .asObject() method handles null values gracefully and prevents the chart from entering an unrecoverable error state.

Change the binding from this:

"high": "{{cell(max_value_query.result, 0, "maxValue").asString()}}"

To this:

"high": "{{cell(max_value_query.result, 0, "maxValue").asObject()}}"

The first binding serializes the query result as a string and fails when the result is null. The second binding serializes the result as an object and accepts null.

Add Null Protection to the SAQL Query with coalesce

Add null protection in the SAQL query using coalesce() to ensure that at least a default value is returned when no data matches:

q = load "dataset";
q = group q by all;
q = foreach q generate max('Value') as 'maxValue';
q = foreach q generate coalesce('maxValue', 100) as 'maxValue';

This query loads the dataset, calculates the maximum value, and replaces a null maximum with the default value 100. The group by all clause ensures that the query always returns exactly one row, even when no records match the current filters.

Steps to Apply the Fix in the Dashboard

  1. Open the dashboard in Advanced Editor and locate the customDomain binding on the Waterfall chart widget.
  2. Replace .asString() with .asObject() on all customDomain bindings (high and low).
  3. Update the bound SAQL query to use coalesce() with a sensible default (for example, the expected maximum domain value).
  4. Test with filter combinations that produce no results to confirm the chart recovers without a page refresh.

Other Chart Types Affected

This applies to any chart type that uses dynamic customDomain bindings, such as Waterfall, Bar, and Line, wherever the bound query may return null or no rows.

Número del artículo de conocimiento

005433455

 
Cargando
Salesforce Help | Article