Role-playing dimensions
Choose a dimension role before creating a relationship
A role-playing dimension is a reusable set of attributes applied to different business meanings. A calendar can describe when a sale was ordered or shipped. The same calendar data does not make those events interchangeable. In this chapter use a new fictional retail fixture, with USD revenue and dates at day precision. Each sales row is one order line, not one order. The order month is derived from OrderDate. Use two copies of a calendar (DimOrderDate and DimShipDate) when consumers need independent selections. In an Import model, configure active one-to-many relationships from each copy's unique Date column to the corresponding Sales column, filtering toward Sales. Create a calendar covering every order and ship date; use date-only types on both ends. These are design instructions, not a tested PBIX.
Example 1: two independent date selections
Load sales.csv as Sales and create a calendar covering the fixture's entire date range. For the two calendar copies, set single-direction relationships: DimOrderDate[Date] → Sales[OrderDate]; DimShipDate[Date] → Sales[ShipDate]. Create the explicit measure:
Sales Revenue = SUM(Sales[RevenueUSD])Use month labels in the corresponding dimensions. January order revenue is 130 USD (L1–L3), but January shipment revenue is 100 USD (L1–L2). Selecting January orders AND February shipments returns 30 USD (L3). February order revenue is 120 USD; February shipment revenue is 150 USD. The grand total is 250 USD in both roles when no date is selected. These numbers classify sales revenue by event date; they do not establish accounting revenue recognition at shipment. If using one calendar instead, an inactive ship relationship can be used by a dedicated measure, but one date selection is not two independent role selections. Chapter 21 will teach relationship-changing calculations in depth; do not treat inactive relationships as security paths.
Example 2: flatten a small snowflake and retain order identity
products.csv has P1 and P2 in C1 (Stationery), and P3 in C2 (Lighting). A normalized warehouse may keep Category separate from Product. A product-focused star can flatten CategoryName into Product, reducing navigation hops and making the hierarchy easier to discover. This duplicates category text, so category corrections must remain consistent. A snowflake retains shared category definitions and can be justified when Category also filters a coarser fact such as Budget. In this chapter's comparison model we intentionally retain DimCategory separately and relate it directly to Sales and Budget; do not additionally connect it to DimProduct and create a second path to Sales. Validate that the copied Sales[CategoryKey] matches each product. OrderID is a degenerate dimension attribute carried on Sales; it has no separate descriptive table in this fixture. O1 has two lines totaling 100 USD. Five line rows represent four distinct orders, not five. If richer order attributes or a separate order-grain fact are needed, model those deliberately.
Common modeling mistakes
Do not use bidirectional filtering simply to make slicers appear to work. Draw each path, define its business meaning and test its intersections. A numeric key such as 20260110 is an identifier, not an amount; a display date is a separate attribute. Do not sum date keys. Avoid a relationship on a nonunique month label in a daily calendar. For the role example, use only the two day-level calendars; the next lesson builds a separate comparison model to avoid ambiguous alternative paths. If a single calendar is used with an inactive relationship, verify report requirements and security separately.
Practice: trace a date role
Predict February order revenue and February ship revenue, then list the line IDs for January orders shipped in February. Count distinct OrderID for January orders. Draw the two active paths and explain why two calendars are useful.