12.6 Creating Global Rules¶
Global Rules are defined once in Datashop's main window and can be reused across any workbook, visual, or dashboard. They're ideal for formatting standards that your organization uses repeatedly—like traffic light indicators for budget variance, alternating row colors for tables, or corporate color sequences for pie charts.
This chapter walks through creating global Rules using the Rule editor, covering both Conditional and Sequential Rule types. For embedded Rules (created within visuals), see Chapter 6: Designing Workbooks.
When to Create Global Rules¶
Create a global Rule when: - It represents an organizational standard that multiple users or dashboards will apply consistently (e.g., "Corporate KPI Traffic Lights") - It's complex to build and you want to avoid recreating it repeatedly (e.g., a five-color heat map with specific thresholds) - Changes should cascade to all visuals using the Rule—updating the global Rule updates every visual automatically - You want to share it with other users in your organization
Use embedded Rules when: - You're experimenting and aren't sure the formatting is final - The Rule is simple and unlikely to be reused (e.g., "highlight negative values in red") - The Rule is specific to one visual and won't apply elsewhere
[!TIP] Start with embedded Rules while developing your dashboards. Once you identify formatting patterns you're using repeatedly, convert them to global Rules for consistency and easier maintenance.
Accessing the Rule Editor¶
To create or edit global Rules:
- Open Datashop's main window (not the Workbook Designer)
- In the left navigation pane, locate the Rules folder
- Expand the folder to see existing global Rules and system Rules
From here, you can: - Create a new Rule: Right-click the Rules folder → New Rule - Edit an existing Rule: Double-click any Rule in the list - Delete a Rule: Right-click a Rule → Delete (system Rules cannot be deleted, only modified)
Creating a Conditional Rule¶
Let's walk through creating a Conditional Rule that highlights profit margins with traffic light colors.
Step 1: Create the New Rule¶
- Right-click the Rules folder
- Select New Rule
- The Rule editor opens with a blank Rule
Step 2: Name the Rule¶
- In the Name field, enter a descriptive name: "Profit Margin Traffic Lights"
- Optionally, add a Description: "Red for margins <5%, yellow for 5-10%, green for >10%"
Good naming conventions: - Be specific: "Profit Margin Traffic Lights" not "Traffic Lights" - Indicate what metric it applies to: "Customer ABC Colors" not "ABC Colors" - Use consistent naming patterns across your organization
Step 3: Set Rule Type¶
- In the Rule Type dropdown, select Conditional
- The editor displays fields for defining Rule Conditions
Step 4: Define Rule Conditions¶
For our traffic light example, we'll create three conditions:
Condition 1: Red for margins below 5% 1. Click [+] to add a new Rule Condition 2. Set Operator: < (less than) 3. Set Value 1: 5 4. Under Style, click Edit Style 5. In the Style editor: - Set Background Color: Red (#CC0000) - Set Font Weight: Bold - Leave other properties as "Automatic" 6. Click OK to save the Style
Condition 2: Yellow for margins between 5% and 10% 1. Click [+] to add another Rule Condition 2. Set Operator: between 3. Set Value 1: 5 4. Set Value 2: 10 5. Edit the Style: - Background Color: Yellow (#FFFF66) - Font Weight: Bold 6. Click OK
Condition 3: Green for margins above 10% 1. Click [+] to add a third Rule Condition 2. Set Operator: > (greater than) 3. Set Value 1: 10 4. Edit the Style: - Background Color: Green (#66CC66) - Font Weight: Bold 5. Click OK
Step 5: Set Data Source¶
In the Data Source section, choose: - Named metric: Select "Profit Margin" if the Rule should always evaluate this specific metric - The column it's applied to: Select this option to make the Rule reusable for any metric column
For this example, choose "The column it's applied to" so the Rule can be applied to any percentage-based metric.
Step 6: Save the Rule¶
- Review all conditions and settings
- Click OK or Save to create the Rule
- The Rule now appears in the Rules folder and can be applied to any visual
Creating a Sequential Rule¶
Let's create a Sequential Rule for alternating row colors in tables.
Step 1: Create the New Rule¶
- Right-click the Rules folder → New Rule
- Name the Rule: "Alternating Rows - Gray/White"
- Add description: "Two-color alternating pattern for table readability"
Step 2: Set Rule Type¶
- In the Rule Type dropdown, select Sequential
- The editor changes to show a list of sequence steps
Step 3: Define Sequence Steps¶
Step 1: White background 1. Click [+] to add a new sequence step 2. Click Edit Style 3. In the Style editor: - Set Background Color: White (#FFFFFF) - Leave all other properties as "Automatic" 4. Click OK
Step 2: Light gray background 1. Click [+] to add another sequence step 2. Click Edit Style 3. In the Style editor: - Set Background Color: Light Gray (#F5F5F5) - Leave all other properties as "Automatic" 4. Click OK
Step 4: Save the Rule¶
- Review the sequence steps
- Click OK or Save
- The Rule is now available in the Rules folder
Organizing Global Rules¶
As your collection of global Rules grows, organization becomes important:
Naming conventions: Use prefixes to group related Rules: - "KPI - Traffic Lights (Budget)" - "KPI - Traffic Lights (Sales)" - "Table - Alternating Rows (Gray)" - "Table - Alternating Rows (Blue)" - "Chart - Corporate Color Sequence"
Folders: If Datashop supports subfolders in the Rules folder, organize Rules by category: - KPI Indicators - Table Formatting - Chart Colors - Heat Maps
Documentation: Maintain a style guide document that lists: - Available global Rules - When to use each Rule - Screenshots showing examples - Who to contact for new Rule requests
Applying Global Rules to Visuals¶
Once created, global Rules can be applied in the Workbook Designer:
Method 1: Drag and drop 1. Open a workbook in Design mode 2. Expand the Rules folder in the Object Explorer 3. Drag the Rule onto a visual or specific data element (metric/dimension column)
Method 2: Context menu 1. Right-click a data element in a visual 2. Select Apply Rule → Choose from the list of global Rules
Method 3: Properties panel 1. Select a visual or data element 2. In the Properties panel, find the Rule property 3. Select a global Rule from the dropdown
For detailed instructions on applying Rules in visuals, see Chapter 6: Designing Workbooks.
Editing Existing Global Rules¶
To modify a global Rule:
- In Datashop's main window, navigate to the Rules folder
- Double-click the Rule you want to edit
- The Rule editor opens with the current configuration
- Make your changes (add/remove/modify conditions or sequence steps)
- Click Save
Important: Changes to global Rules immediately affect all visuals using that Rule across all workbooks. Test changes carefully before saving, especially for widely-used Rules.
[!WARNING] Editing a global Rule updates every visual using it. If you need to create a variation without affecting existing visuals, create a new Rule instead of modifying the existing one.
Converting Embedded Rules to Global¶
If you've created an embedded Rule in a visual and want to make it global:
- In the Workbook Designer, right-click the data element with the embedded Rule
- Select Convert to Global Rule (exact menu option may vary)
- Provide a name and description
- The Rule is added to the global Rules folder
- The visual now references the global Rule instead of the embedded version
This allows you to start with quick embedded formatting and formalize it when you're ready.
Best Practices¶
Start simple: Create basic Rules first. A simple "highlight negatives in red" Rule is easier to maintain than a complex five-condition heat map. Add complexity only when needed.
Test before deploying: Always test new global Rules in a development workbook before using them in production dashboards. Ensure they work correctly with real data volumes and edge cases.
Version control: If a Rule is widely used, consider creating versioned copies when making significant changes: - "KPI Traffic Lights v1" (original) - "KPI Traffic Lights v2" (updated thresholds)
This allows you to migrate visuals gradually rather than breaking existing dashboards.
Document changes: Keep a change log for important global Rules, especially those used in executive dashboards. Note what changed, when, and why.
Limit global Rules: Don't create a global Rule for every possible formatting scenario. Reserve global Rules for patterns you'll actually reuse. Too many global Rules make selection overwhelming.
Tips – Creating Global Rules¶
- Name Rules descriptively—include the metric, visual type, or purpose in the name.
- Use the Rule description field to document thresholds and intended use cases.
- Test global Rules with realistic data before deploying to production dashboards.
- Create style guides showing examples of when to use each global Rule.
- Remember that global Rules cascade changes to all visuals using them—plan updates carefully.
Common Issues – Creating Global Rules¶
Problem: I saved the Rule but it doesn't appear in the Rules folder
- Solution: Refresh the Rules folder view (right-click → Refresh). If it still doesn't appear, check that you saved (clicked OK/Save) rather than canceling the editor.
Problem: I edited a global Rule but visuals using it haven't updated
- Solution: Close and reopen affected workbooks. In some cases, you may need to remove and reapply the Rule to the visual to see changes.
Problem: Too many global Rules—users can't find the right one
- Solution: Implement a naming convention with prefixes (e.g., "KPI -", "Table -", "Chart -"). Delete or archive Rules that are no longer used. Create a reference guide with screenshots showing when to use each Rule.
Problem: I accidentally edited a widely-used Rule and broke several dashboards
- Solution: If the change was recent, restore from backup if available. Otherwise, identify affected visuals and manually fix formatting. Going forward, create new Rules for variations rather than editing critical existing Rules.
Related Topics¶
- 12.1 What are Rules
- 12.3 Conditional Rules
- 12.4 Sequential Rules
- 12.5 System Rules
- Chapter 7 Designing Workbooks
Next Steps¶
Now that you understand global Rules, explore how to apply them effectively in visuals by reviewing Chapter 7 Designing Workbooks, or customize your organization's visual identity by configuring 12.5 System Rules.