Forum Discussion

Thomas_MedOne's avatar
Thomas_MedOne
Helper III
4 years ago
Solved

Multiple Links/relationships?

I've got this table that contains patients. There is an Admission Date and Discharge Date.  We have a Date Table and that relationship is linked to the Admissions table to Admission Date.

 

We use this table to get information in PBI for Admissions to our facilities. This works great, no problems.

 

Now they want to get information on discharges. So I used the same table and I'm slicing by date, etc. but I'm realizing the data is wrong when I try to get some of the visuals because it's slicing based on Admission Date and not Discharge date.

 

So, do I need to import another table that is identical with a different name but the relationship is linked to the Date table on Discharge date?

  • Not sure about the visual representation and data related details but i would suggest you can create a inactive relationship with the discharge date and in all the measures use the userelationship  DAX Function.

     

    If this doesnt helps can you please share a sample pbix with sensitive data removed  so that we can check ?

     

    Please accept this as a solution if your question has been answered !!

    Appreciate a Kudos ğŸ˜€

     

    Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/

  • Hi,

    the one you suggest is an option.

    Otherwise you have to create another inactive relationship between your date table and the fact table  (Date table on Discharge date) and then use USERELATIONSHIP to activate it when you need.

    There are advantages and disadvantages in both solutions.

    You can find tutorial like this

    UseRelationship or Role-Playing Dimension; Dealing with Inactive Relationships in Power BI by Radacad

     

    If this post is useful to help you to solve your issue consider giving the post a thumbs up 

     and accepting it as a solution !

2 Replies

  • Not sure about the visual representation and data related details but i would suggest you can create a inactive relationship with the discharge date and in all the measures use the userelationship  DAX Function.

     

    If this doesnt helps can you please share a sample pbix with sensitive data removed  so that we can check ?

     

    Please accept this as a solution if your question has been answered !!

    Appreciate a Kudos ğŸ˜€

     

    Connect with me on LinkedIn: https://www.linkedin.com/in/jaideepnema/

  • Hi,

    the one you suggest is an option.

    Otherwise you have to create another inactive relationship between your date table and the fact table  (Date table on Discharge date) and then use USERELATIONSHIP to activate it when you need.

    There are advantages and disadvantages in both solutions.

    You can find tutorial like this

    UseRelationship or Role-Playing Dimension; Dealing with Inactive Relationships in Power BI by Radacad

     

    If this post is useful to help you to solve your issue consider giving the post a thumbs up 

     and accepting it as a solution !