Formatting Rules
Formatting Rules allow you to dynamically control how cells appear and behave within a Matrix. Rules are evaluated per cell, based on conditions you define, and can modify styling, lock cells, and utilize metadata about the row and column structure.
Formatting Rules are configured at the dataset level and execute in order from top to bottom. If multiple rules match the same cell, the last rule (lowest in the list) takes precedence.
Overview
Formatting Rules consist of three key components:
Condition – An expression determining whether the rule applies
Format – Visual styling or locking behavior
Priority – Determined by rule order; last matching rule wins
Placeholder: screenshot of Rules panel
Formatting Rules affect only the dataset in which they are defined. Other datasets in the same Matrix are not impacted unless they have their own rules.
Conditions
Conditions are written using template expressions. They can reference:
The cell value
Row metadata
Column metadata
Other cell attributes (e.g., leaf status, label, indent, LID presence)
Common Condition Elements
{value}{meta.row.0.key}{meta.col.1.caption}{meta.col.0.properties.<propertyKey>}
Example: Value-Based Condition
{value} >= 10000
Example: Metadata-Based Condition
AND({meta.col.0.key} = 10, {meta.col.1.key} = 202501)
Use metadata conditions to target specific scenarios, periods, or dimension members that may change depending on dashboard filters.
Formatting Options
A rule can apply a variety of visual and behavioral changes to cells:
Background color
Text color
Text alignment
Font weight
Cell locking
Placeholder: screenshot of formatting options
Locked cells cannot be edited until the rule’s condition is no longer met.
If a cell becomes locked due to a matching rule, users will not be able to modify it—even if other rules allow editing. Always confirm rule order to avoid unintended locking behavior.
Rule Ordering & Priority
Rules are evaluated sequentially from top to bottom. Once all matching rules have been evaluated, the last one determines the final formatting for the cell.
Placeholder: screenshot of draggable rule list
Rearranging rules changes the final output without changing the conditions themselves.
Place general formatting at the top and highly specific formatting near the bottom. This prevents broad rules from overriding targeted behavior.
Duplicating & Removing Rules
Rules can be duplicated to speed up creation of similar logic. Removing a rule deletes it permanently.
Closing and reopening the Rules panel retains all valid rules without generating errors.
Conditional Formatting Example
Highlighting High Values
Condition: {value} >= 10000
Format: Bold text, green color
Effect:
Cells meeting the condition show green, bold text
No other cells are affected
Locking Based on Metadata
AND(
{meta.col.0.key} = 10,
{meta.col.1.key} = 202501
)
This could represent a specific “Fcst(1+11)” + “January 2025” combination.
Result:
These cells become blue
They become locked and cannot be edited
Placeholder: screenshot of metadata-driven formatting
If dashboard filters change, metadata changes as well. Rules may stop matching, causing locked cells to become editable again.
Dashboard Filter Interaction
Because metadata is influenced by dashboard filters, Formatting Rules update dynamically whenever a user adjusts filters such as Scenario or Period.
This can:
Enable or disable locked states
Change styling
Reveal or hide formatting for entire columns or rows
When designing rules that depend on metadata, always consider how filter changes will affect rule matching.
Best Practices
Use value-based rules sparingly for performance and clarity.
Use metadata-based rules to control formatting by scenario, period, product, or other hierarchy elements.
Keep highly specific rules at the bottom of the list.
Duplicate rules for repeat patterns to ensure consistency.
Be cautious with locking—ensure users understand why cells are locked.
Avoid creating conflicting metadata rules that overlap in unpredictable ways. Overlapping rules may create formatting patterns that are difficult for end users to understand.
Summary
Formatting Rules give you precise control over:
Styling
Editability
Metadata-driven behaviors
Context-sensitive formatting that responds to filters
They enable sophisticated presentation and interaction patterns within Matrices while remaining flexible and easy to maintain through clear rule ordering.
Placeholder: final screenshot of formatted matrix