Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pe2950
Helper I
Helper I

Duplicate DateKey Relationship To 1 Table? (Correct Model Configuration?)

I'm attempting to configure my data model, but have a question as to 'best practice' for this type of situation...

 

I have a table that contains appointments. The appointments have two date properties of intrest:

 

  1. Appointment Date = Date of the individuals appointment
  2. Create Date = Date the appointment record was created

I have a typical DateKey table in my model, but I'm a bit confused about how to setup the relationship in the model. Do I:

 

  1. Create a *:1 on appointments.appointment_date = DateKey.Date (cross filter both) & create *:1 on appointments.create_date = DateKey.Date (cross filter both)
  2. Only create 1 of the two relationships
  3. Don't create any relationship, and powerBI will utilize the datetable, as it is marked as a date table and no relationship is needed? 
1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Hi @pe2950,

 

your scenario is known as Role Playing Dimensions. You can create an active relationship between the Date dimension and the column from the fact table which you're more likely to use and an inactive relationship between the Date dimension and the other column in the fact table. When you want to browse your model by the date of the inactive relationship use the USERELATIONSHIP  function to activate it in your measure

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

1 REPLY 1
LivioLanzo
Solution Sage
Solution Sage

Hi @pe2950,

 

your scenario is known as Role Playing Dimensions. You can create an active relationship between the Date dimension and the column from the fact table which you're more likely to use and an inactive relationship between the Date dimension and the other column in the fact table. When you want to browse your model by the date of the inactive relationship use the USERELATIONSHIP  function to activate it in your measure

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.