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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
abrahamfariaz
Frequent Visitor

How to relate multiple columns from one table to the same column in another table?

I want to relate the columns "ID_Delito Primero," "ID_Delito_Segundo," "ID_Delito_Tercero," "ID_Delito_Cuarto," and "ID_Delito_Quinto" from the "Sentenciado" table with the column "ID_Delito" from the "Delito" table. However, when I try to do this, Power BI only allows one active relationship and deactivates the others. Can you help me?

 

abrahamfariaz_0-1689538947807.png

abrahamfariaz_1-1689538974725.png

abrahamfariaz_2-1689539002686.png

abrahamfariaz_3-1689539013717.png

 

1 ACCEPTED SOLUTION

Hi @abrahamfariaz ,

You can refer the following links to get it:

Using USERELATIONSHIP function:

Inactive relationships

vyiruanmsft_2-1690365269581.png

Orders Shipped =
CALCULATE(
    COUNTROWS(Sales)
    ,USERELATIONSHIP('Date'[Date], Sales[ShipDate])
)

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

vyiruanmsft_0-1690365231338.pngvyiruanmsft_1-1690365249993.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
abrahamfariaz
Frequent Visitor

Hi @rubayatyasmin,

Thanks for your answer!

And how can I solve this? Because each "Sentenciado" (defendant) can commit diferent "Delito" (crimes), and more than one at a time.

Thanks in advance!

Hi @abrahamfariaz ,

You can refer the following links to get it:

Using USERELATIONSHIP function:

Inactive relationships

vyiruanmsft_2-1690365269581.png

Orders Shipped =
CALCULATE(
    COUNTROWS(Sales)
    ,USERELATIONSHIP('Date'[Date], Sales[ShipDate])
)

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

vyiruanmsft_0-1690365231338.pngvyiruanmsft_1-1690365249993.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rubayatyasmin
Super User
Super User

Hi, @abrahamfariaz 

 

Power BI allows only one active relationship with a table, other relations will be deactivated. But if you want to use any deactivated relations you have to use "related" or "relatedtable" DAX function. 

Here is a article with example for you. 

 

If this post helps, accept this answer as a solution

 

If my assistance helps you in any way, hit  👍

 

Thanks

 

 

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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