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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Many-One Relationship when there are Unique values in both tables

I am attempting to link togther two tables that both have unique values, however, it is not allwoing me to make a one:one relationship- instead making a many:one relationship.

 

I have checked in Excel & Power Bi itself and the table on the many side has all unique values with no blanks 

uc360_0-1682003869205.png

See above I have ordered count of item#/cmi# in descedning order and the highest count is one and therefore there is all unique values.

 

Thanks in advance for any help,

 

Adam P

 

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

There are two ways to edit a relationship in Power BI.

The first method to edit a relationship is using the Editing relationships in the Properties pane in Model view, where you can select any line between two tables to see the relationship options in the Properties pane. Be sure to expand the Properties pane to see the relationship options.

The other method of editing a relationship is using the Relationship editor dialog, which you can open many ways from within Power BI Desktop.

vtangjiemsft_0-1682301189528.png

 

Please refer to the following document for more information.

Create and manage relationships in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Neeko Tang

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

Anonymous
Not applicable

Hello Neeko,

 

Thanks for your reply.

I know how to edit teh relatiosnhips but Power bi is not accepting the one:one cardinality taht it shoudl be.

uc360_0-1682328298222.png

For some reason, it is detecting dupliacte values in one of the tables which are unique.

 

Kind Regards, Adam P

Hi @Anonymous ,

 

This is due to the design, and one-to-one relationships are not supported when there are duplicate values in the table.
You can use the values() function or the distinct() function to create a table with deduplicated values. Then establish a one-to-one relationship with the new table.

vtangjiemsft_0-1682329238809.png

Please refer to my PBIX file.

 

Best Regards,

Neeko Tang

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

Anonymous
Not applicable

Hi @v-tangjie-msft ,

 

I think the issue was buggy source data- a new file I loaded in is now allowing the one:one relationship.

 

Thank you very much for yor help, I apprecite you taking the time.

 

Adam P

Anonymous
Not applicable

@v-tangjie-msft 

I created a new table using Value Function and Distinct Function respectively and it is still not allowing me to create one:one relationship with either of the calculated tables

Anonymous
Not applicable

uc360_0-1682330870920.pnguc360_1-1682330926512.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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