Skip to content

12.1 What are Rules

Rules in Datashop are the formatting engine that brings your data to life. They automatically apply colors, fonts, borders, and visual indicators to your visuals based on the values they contain—transforming bland tables into compelling dashboards that highlight what matters most.

A Rule is an object that contains one or more Rule Conditions, each defining when and how to format your data. Rules can highlight underperforming products in red, show traffic-light indicators for budget variance, or simply alternate row colors in a table for better readability.

Most users interact with Rules through the Conditional Formatting menu in the Workbook Designer (see Chapter 6), where creating formatting rules is quick and intuitive. However, understanding Rules as objects—particularly global Rules and system Rules—unlocks powerful capabilities for maintaining consistent formatting standards across your organization.

How Rules Work

At their core, Rules answer two questions: - When should formatting apply? (defined by Rule Conditions) - What formatting should apply? (defined by Style objects)

When Datashop renders a visual, it evaluates all applicable Rules for each data element (metric or dimension). Matching Rule Conditions are merged in order, creating a final "result style" that combines all formatting properties. This merged style is then applied to the cell, bar, line segment, or other visual element.

Types of Rules

Datashop supports two fundamental Rule types:

Conditional Rules Apply formatting based on data values. For example, "highlight profit margins below 10% in red" or "show an up arrow when sales exceed last year."

Sequential Rules Apply formatting in a repeating pattern. For example, "alternate gray and white rows in tables" or "cycle through five colors in a pie chart."

Global vs. Embedded Rules

Rules exist in two forms:

Global Rules are defined once in Datashop's main window and can be reused across any workbook or visual. They're ideal for: - Organization-wide formatting standards (e.g., "Corporate KPI Traffic Lights") - Complex Rules that would be tedious to recreate - Ensuring consistent formatting across multiple dashboards

Embedded Rules are created directly within a specific visual using the Conditional Formatting menu. They exist only within that visual and cannot be shared. They're ideal for: - Quick, ad-hoc formatting needs - Experimental formatting before committing to a global Rule - Visual-specific formatting that won't be reused elsewhere - Special formatting only available for embedded rules. This includes most notably the color scales.

[!NOTE] Most users work exclusively with embedded Rules via the Conditional Formatting menu in the Workbook Designer (Chapter 6). This chapter focuses on global Rules and system Rules—the foundation that powers all formatting in Datashop.

System Rules

Datashop includes a set of predefined system Rules that control default formatting behaviors throughout the application. These include:

  • Corporate Colors: Define your organization's brand colors for easy access in color palettes
  • Default Highlights: Standard colors for "good" and "bad" indicators in KPIs
  • Default Shapes: Shapes (arrows, symbols) available in indicator palettes
  • Indicator Colors: Colors used in heat maps and color scales
  • Pie Graph Color Sequence: Default color progression for pie and donut charts

Unlike regular global Rules, system Rules are special because they populate color palettes, shape pickers, and other UI elements throughout Datashop. Customizing these system Rules tailors the entire application to your organization's visual identity.

Tips – What are Rules

  • Start with embedded Rules for quick wins. Convert them to global Rules only when you need to reuse formatting across multiple visuals or workbooks.
  • Customize system Rules early in your Datashop implementation to establish visual consistency across all dashboards.
  • Rules can format entire visuals or individual data elements. Apply a Rule to a specific metric to highlight only that column, or to the whole visual to format everything.

Next Steps

12.2 Rule Conditions and Styles