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
Babinsky
Helper I
Helper I

Create Relationship

Hi everyone, I have a question - I'm getting the following error message.

 

You can't create a relationship between these two columns because one of the columns must have unique values.  

 

These two columns are date fields.  One is week format is other dat format, so I understand the confilct.  

 

Does anyone have any suggestions?  Thanks!

 

Babinsky

 

 

 

1 ACCEPTED SOLUTION
TedPattison
Microsoft Employee
Microsoft Employee

In the tabular database model, you can only create a relationship between two tables when at least one of the columns being used to create the relationship has unique values. It seems like both of your date fields have duplicates values.

 

You need to deteremine which of these two date columns in your two tables should have a unique values. Then use the Power BI Desktop query tool to de-duplify these duplicate date values so that the query outputs a table with unique column values. After that, you should be able to create the relationship.

View solution in original post

5 REPLIES 5
TedPattison
Microsoft Employee
Microsoft Employee

In the tabular database model, you can only create a relationship between two tables when at least one of the columns being used to create the relationship has unique values. It seems like both of your date fields have duplicates values.

 

You need to deteremine which of these two date columns in your two tables should have a unique values. Then use the Power BI Desktop query tool to de-duplify these duplicate date values so that the query outputs a table with unique column values. After that, you should be able to create the relationship.

Thanks for the suggestion Ted.  Question - how do you de-duplify these duplicate date values?

First, make sure that the column in question is based on Date and not DateTime when you examine it in the query edito window. Next, you use the Group By step so that every row withthe same date is collapsed into the single row.

 

Is this table you are working with a specialized Calendar table?

Thanks for suggestion.  Do you or anyone know how to remove duplicate rows in Power Bi so the fields are unique?

@Babinsky

You can remove the duplication in Power Query. Check a similar thread.

 

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