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
Anonymous
Not applicable

Not possible to set One to Many Relationship with Table with Unique key Values

Dear Community;

I'm quite familiar with Tabular Data Models and I heve been working with Power BI since few years already, I clearly understand the principle of the Relational Data Model, this time I'm trying to create a One to Many relation between 2 tables and I got a message in Power BI Desktop warning that is a cardinality Many-Many.

I've have checked by all the meaninings the uniqness of the values in my Column key and they're unique in one of the table, herein some screenshots to support my issue:

Data Model:

WGAP75_0-1607002249117.png

 

Message when I try to set Relationship:

WGAP75_1-1607002346969.png

Table Verification for Distinct Values on Table N-1 Reports:

 
 

2020-12-03_13-53-04.jpg

 

 

 

 

Can you please help me to solve this issue?  Probably I'm missing something I can't see to set this relationship.

 

Thanks in Advance for you Useful Help;

WGAP75

 

 

 

 

2 REPLIES 2
PaulDBrown
Community Champion
Community Champion

@Anonymous 

BLANK values can cause this. (and checking the number of unique values and rows is not necessarily a confirmation:

one table can have ABC, another BCD - both have 3 rows, both have the same number of unique values and yet the values are different...)

To solve this you can create a bridget table between the two conflicting tables including all unique values from both the tables you are trying to create. You can create a new table with:
New bridge table = 
VAR ValuesT1 = VALUES(Table1[Column])
VAR ValuesT2 = VALUES (Table2[Column])
RETURN
DISTINCT(
UNION(ValuesT1, ValuesT2)
)

Then create a One-to-Many relationship between this bridge table and the other two tables.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Just a thought, what if delete the relationship between 'people lookup' and 'N-1 reports'.

 

Best Regards,

Jay

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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