You are here:
Conditional Formatting Considerations
Keep these considerations in mind when setting up conditional formatting.
- Conditional formatting can cause deployment failures. Before deploying a dashboard, we recommend removing all conditional formatting in the widget properties.
- You can’t apply conditional formatting to a query that contains a period (.) in the query ID. To apply it, modify the query ID.
- Each chart or number widget can have one conditional formatting rule.
- You can apply only one conditional rule to chart and number widgets with the same underlying query.
- In a pivot table, you can apply conditional formatting to all columns other than the pivoted dimension.
- Conditional formatting is removed if you manually change the query ID or dev column name in the dashboard JSON or SAQL, and save the dashboard or clip the lens to a dashboard.
- Conditional formatting set in the widget properties doesn’t appear in the dashboard JSON. Any conditional formatting previously set up in the dashboard JSON is retained.
If a dimension or measure name is defined in the query to contain leading or trailing whitespace, the conditional formating trims the whitespace from the name and the formatting isn’t saved as expected. It is recommended that you don’t use leading or trailing whitespaces in names when using conditional formatting.
For example, a query defining a field name of
" Test1" as 'TestDim'doesn’t work with conditional formatting.q = load "superstore"; q = group q by 'Product_Category'; q = foreach q generate (" " + q.'Product_Category') as 'Product_Category', " Test1" as 'TestDim', count(q) as 'A'; q = order q by 'Product_Category' asc; q = limit q 2000;

