Using Mapped Dimensions

by gopigment6fec49f4ce9dNo licenseListed Oct 8, 2026Updated Oct 8, 2026

Execution skill. Use when modeling dynamic or time-dependent hierarchies, card metrics for flexible reporting (e.g. headcount by team/function via BY-arrow mappings), or any scenario where reporting breakdowns must differ from the structural dimensions on the metric.

Instructions onlyData & Analytics
AI-generated overview

Explains how to model time-dependent hierarchies in Pigment using mapped dimensions and joined pivots in views.

What it does
This skill guides an agent through implementing mapped dimensions (time-dependent hierarchies) in Pigment. It covers deciding between static dimension-type properties and mapped dimensions, creating a mapping metric, populating it by formula, manual input or import, and exposing it as a Joined Pivot in a view. It also lists scope limits, dimensional transformation cases, best practices and comparisons with alternative approaches.
When to use it
Use it when parent-child relationships change across periods or versions, such as employee-to-team assignments by month or cost center to department after a re-org. It also applies when reporting breakdowns must differ from the structural dimensions on a metric.
Requirements
Requires an agent with access to the Pigment MCP tools named in the document (create_metric, set_metric_input, create_view, update_view_pivots). Bulk import of mapping values must be done by the user in the Pigment UI. No scripts are shipped.

Using Mapped Dimensions

Mapped dimensions (time-dependent hierarchies, slowly changing dimensions) model parent-child relationships that change across periods. Past periods keep the old parent; future ones reflect the new assignment.

Choose Between Static Properties and Mapped Dimensions

CriterionDimension-Type Property (static)Mapped Dimension (dynamic)
Relationship changes?Rarely or neverChanges over time or by version
History preservationUpdating the parent moves all history with the childEach period retains its own parent assignment
Where it worksMetric formulas, aggregation, viewsViews only (Joined Pivot); core metrics stay lean
ExamplesProduct to Category, Store to RegionEmployee to Team (monthly), Cost Center to Department (re-org), Product to Promotion (seasonal)

Rule of thumb: if the parent-child mapping is the same for all periods, use a dimension-type property. If it varies by Month, Quarter, or Version, use a mapped dimension.

Implement a Mapped Dimension

Step 1 — Create the Mapping Metric

Create a metric with:

  • Data type: Dimension (referencing the target parent dimension).
  • Structure: the source (child) dimension, plus the dimension along which the relationship changes (typically Month; sometimes Version).

Example: Employee Team Mapping structured on Employee x Month, data type Dimension referencing Team. Each cell holds the Team assignment for that employee in that month.

Use tool:create_metric to create the mapping metric.

Step 2 — Populate the Mapping

  • Formula: derive the assignment from other data.
pigment
IF(Month >= 'Employee'.'Transfer Date', 'Employee'.'New Team', 'Employee'.'Original Team')
  • Manual input: use tool:set_metric_input.
  • Import: no public MCP bulk-import for metrics; ask the user to load mapping values in the Pigment UI, or use tool:set_metric_input for small datasets.

Step 3 — Use Joined Pivot in Views

Use tool:create_view then tool:update_view_pivots to add the mapped dimension as a Joined Pivot. Do not add the parent dimension to every underlying metric's structure.

When users view a metric like Salary (structured on Employee x Month), the Joined Pivot through Employee Team Mapping aggregates salaries by Team with each month reflecting the correct assignment.

Scope and Limitations

  • Mapped dimensions work in Views only. Cannot reference them in formulas.
  • Mapping metric consumes storage proportional to child items x periods. Keep manageable.
  • Parent dimension does not become part of metric structure — keeps metrics lean, avoids dimension explosion.
  • BLANK mapping cells mean the child has no parent for that period and won't appear under any parent group in the View.

Dimensional Transformation Interaction

  • Case 0 (no modification): mapping metric has same dimensions as source metric. No transformation needed.
  • Case 1 (aggregation): View aggregates child-level data to mapped parent level. Aggregation operator defined on View pivot.
  • Case 2 (allocation via properties): use static property for fixed allocation; mapped dimension when allocation parent changes over time.
  • Case 3 (add/remove dimensions): mapped dimensions do not add structural dimensions. Parent appears only in the View.

Best Practices

  • Use only when the relationship genuinely varies over time. Static hierarchies are simpler and more performant.
  • Name mapping metrics clearly: [Child] [Parent] Mapping (e.g. Employee Team Mapping).
  • Keep time granularity as coarse as possible (Quarter instead of Month if changes are quarterly).
  • Add Version to mapping metric structure when mapping varies by Version as well.
  • Document re-org dates so users understand why aggregations shift.

Compare with Alternative Approaches

ApproachProsCons
Dimension-type propertyWorks everywhere (formulas, Views); simpleOverwrites history when parent changes
Mapped dimensionPreserves history; no metric restructuringView-only; requires a mapping metric
Separate dimension per periodFull flexibilityDimension explosion; hard to maintain
Boolean flag propertySimple filteringNo aggregation to parent

Mapped dimensions are the standard solution for time-dependent aggregation without restructuring metrics or losing historical assignments.

Source and attribution

Source:gopigment/ai-pluginsinskills/using-mapped-dimensionsat commit6fec49f

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal