Forum Discussion
How to create a relationship between these two dates in Live connection?
I'm trying to create a relationship between these two highlighted dates and use them as one single slicer in live connection? Is it possible to do it?
Appreciate any help.
Thanks
Hi Anonymous
When you're working with a Live Connection (e.g., to Analysis Services or a Power BI dataset) — your ability to create relationships or calculated tables/measures is very limited or entirely read-only, depending on the source. Let's break this down:
❓Can You Create a Relationship Between Two Dates in Live Connection?
❌ No, not directly in Power BI
-
In a Live Connection, the data model is managed externally (e.g., in SSAS or a published Power BI dataset).
-
That means you cannot create new relationships, calculated columns, or new tables inside the report itself.
Workarounds
1. Use a Shared Date Table in the Source Model
If you own or have access to edit the source model, the best practice is:
-
Ensure both tables with the date fields are related to a single shared Date Dimension
-
Use that shared Date table as your slicer
This gives you unified filtering without needing a new relationship.
Use a “Disconnected” Date Table with Measures (If Not Live)
If you were using Import mode (not Live), you could:
-
Create a disconnected Date table
-
Use
USERELATIONSHIP()in measures to switch context
But again — this is not possible in Live mode
Request Model Update From Data Owner
If you need this functionality and can’t edit the model, coordinate with:
-
The dataset/model owner
-
Ask them to:
-
Add a shared Date table
-
-
Create relationships from your two tables to that shared Date
Alternative (If You Can't Edit Model)
You can simulate some logic using visual-level filters or DAX measures like:
MyMeasure =
CALCULATE(
[Some Metric],
FILTER(
'Table1',
'Table1'[Date1] = SELECTEDVALUE('DateSlicer'[Date])
)
)
But again, this only works if you have flexibility to write measures — which also may be locked in Live mode.Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
-
1 Reply
- johnbasha33Super User
Hi Anonymous
When you're working with a Live Connection (e.g., to Analysis Services or a Power BI dataset) — your ability to create relationships or calculated tables/measures is very limited or entirely read-only, depending on the source. Let's break this down:
❓Can You Create a Relationship Between Two Dates in Live Connection?
❌ No, not directly in Power BI
-
In a Live Connection, the data model is managed externally (e.g., in SSAS or a published Power BI dataset).
-
That means you cannot create new relationships, calculated columns, or new tables inside the report itself.
Workarounds
1. Use a Shared Date Table in the Source Model
If you own or have access to edit the source model, the best practice is:
-
Ensure both tables with the date fields are related to a single shared Date Dimension
-
Use that shared Date table as your slicer
This gives you unified filtering without needing a new relationship.
Use a “Disconnected” Date Table with Measures (If Not Live)
If you were using Import mode (not Live), you could:
-
Create a disconnected Date table
-
Use
USERELATIONSHIP()in measures to switch context
But again — this is not possible in Live mode
Request Model Update From Data Owner
If you need this functionality and can’t edit the model, coordinate with:
-
The dataset/model owner
-
Ask them to:
-
Add a shared Date table
-
-
Create relationships from your two tables to that shared Date
Alternative (If You Can't Edit Model)
You can simulate some logic using visual-level filters or DAX measures like:
MyMeasure =
CALCULATE(
[Some Metric],
FILTER(
'Table1',
'Table1'[Date1] = SELECTEDVALUE('DateSlicer'[Date])
)
)
But again, this only works if you have flexibility to write measures — which also may be locked in Live mode.Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
-