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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Find keys that avoid one to many relationships

Hi

 

I'm trying to create a 1-to-many relationship between two tables. According to me, it is a valid relationship. But when I try to create the 1-to-many relationship in powerbi I get a message: "This relationship has cardinality many-to-many..." and can't change it to 1-to-many.  I want to filter the data from source, but can't find what data needs to be filtered.

                                                    Annotation2.png

 

I'm trying to find which key is causing the problem, but I can't find it. For this, I've created two Tables in a report:

1) The first, with the list of the keys of table B and the count of the keys from table B.  This show only 1, as expected.

2) The second, with the list of the keys of table A and the count of the keys from table B. This shows 8 and others numbers, as expected.

 

How can I find the keys causing the trouble?

Thanks!

 

Annotation3.pngAnnotation4.png

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 


How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

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

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

There may be multi same value in the column LlaveAtencionDetales of Table A, we can put column LlaveAtencionDetales and the following measure into a table visual to find the rows.

 

HasMultiSameValueThisColumn =
IF ( COUNTROWS ( 'Atenciones' ) > 1, "YES", BLANK () )

Best regards,

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

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

Give a quick try to below step.
1. Create one new table which has only one column let's say KeyValue and it has only unique value from your master table legs say table B.
NewTable column name=values(Table B[Liaveattenciondetail])
2. Now you have 3 tables A, B and above created table let's say C.
3. So join table A with C using one to many and then again connect C to B using many to one.

Now this become kind of star scheme model.

Please give Kudos to this effort and mark it as a solution if it helps.
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
Anonymous
Not applicable

Hi Tahreem

 

Thanks, but with that I'll end up with three tables. What I need is to get the keys that don't make possible to create the 1-to-many relationships, because that keys are wrong and should not be there, and must be corrected in the data source.

But I can't find any of these keys.

Thanks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors