Forum Discussion
Fact Table Multiple Dates Relationship with Dimension Date
- 6 months ago
hello ShayanSiddiqueI
this should be done by using calendar table then use the calendar column as date in visualisation.
Thank you.
- 6 months ago
Option 1) Single Date table + USERELATIONSHIP
Keep one Date dimension and create:
-
1 active relationship (e.g., Order Date)
-
Other relationships inactive (e.g., Ship Date, Invoice Date)
Then create measures like:
Sales by Ship Date = CALCULATE( SUM(Fact[Amount]), USERELATIONSHIP(Fact[ShipDate], DimDate[Date]) )Option 2) Role-Playing Date Dimensions
If you need to:
-
Show Order Date, Ship Date, Invoice Date side by side in the same visual
-
Slice/filter independently by each date type
Then create:
-
DimDate_Order
-
DimDate_Ship
-
DimDate_Invoice
All copied from the same Date table and each one has:
-
Its own active relationship
-
Option 1) Single Date table + USERELATIONSHIP
Keep one Date dimension and create:
-
1 active relationship (e.g., Order Date)
-
Other relationships inactive (e.g., Ship Date, Invoice Date)
Then create measures like:
Sales by Ship Date =
CALCULATE(
SUM(Fact[Amount]),
USERELATIONSHIP(Fact[ShipDate], DimDate[Date])
)
Option 2) Role-Playing Date Dimensions
If you need to:
-
Show Order Date, Ship Date, Invoice Date side by side in the same visual
-
Slice/filter independently by each date type
Then create:
-
DimDate_Order
-
DimDate_Ship
-
DimDate_Invoice
All copied from the same Date table and each one has:
-
Its own active relationship