Loading

CRM Analytics: Conditional Formatting Does Not Automatically Apply to Dynamically Generated Month Columns in Table Widgets

Дата публикации: Oct 8, 2026
Описание

When a Table widget in a CRM Analytics dashboard uses SAQL to dynamically generate time-based columns, conditional formatting rules configured on the widget do not carry over to new columns as they appear. Examples of these columns are rolling month columns such as M-1, M-2, MTD, QTD, and YTD, or calendar month keys such as 2026-05 and 2026-06.

Users observe the following behavior:

  • The Conditional Formatting panel only shows columns explicitly listed in the Advanced Editor's columns array at the time the rules were created.
  • New month columns generated by SAQL query results do not inherit any existing conditional formatting rules.
  • Conditional formatting rules appear to apply correctly when pre-configured against future column names using test data, but formatting does not persist once null or placeholder columns are removed.
  • Removing the columns restriction in Advanced Editor exposes all columns but alters the widget's column display behavior.
Решение

This article answers why conditional formatting does not apply to dynamically generated month columns in a CRM Analytics Table widget, and which options you can use to format those columns.

Why Conditional Formatting Does Not Apply to Dynamic Columns

This is expected behavior. Conditional formatting rules are static widget metadata, and they are not query-driven. Rules are created against specific column names that exist in the widget definition at the time of configuration. Dynamically generated columns from SAQL have no conditional formatting rules until you explicitly add them.

Option 1: Pre-configure Rules for Future Columns

Add conditional formatting rules for the next 12 to 24 months ahead of time. Even if those columns contain no data yet, the rules activate automatically when data appears for that column name. Establish a quarterly or annual maintenance task to extend the rules for upcoming periods.

Option 2: Use SAQL-Based Formatting (Recommended for Fully Dynamic Tables)

Instead of widget-level conditional formatting, implement the formatting logic directly in the SAQL query. Use case statements to emit a color or status field, and then reference that field as a column in the table:

q = load "dataset";
q = foreach q generate
...,
case
when 'M-1' > target then "red"
when 'M-1' >= threshold then "green"
else "yellow"
end as 'M-1_color';

This query adds a column named M-1_color. The column holds red when the M-1 value is above the target, green when it is at or above the threshold, and yellow otherwise.

Option 3: Define Static Columns

Remove dynamic column generation and define static columns for the expected date range (for example, the next 12 to 24 months) directly in the Advanced Editor columns array. Apply conditional formatting to all defined columns. Update the widget definition annually to add the next year's columns.

Номер статьи базы знаний

005433454

 
Загрузка
Salesforce Help | Article