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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
DarylM
Helper II
Helper II

Can't create a relationship between two columns

Hi, I am having trouble creating a relationship betwene two tables. 

One table has a unique customer number and name along with customer details like address, phone, etc. 

The other table with sales transactions for products. There are multiple lines for each item a customer purchased. 

 

I feel the customer number columns should create the relationship as as a one to many, but it does not work. 

 

Any thoughts?Capture.JPG

1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

Somehow you must have ended up with at least one duplicate in the customer table. You can either use the Remove Duplicates option in the query editor, or perhaps you can hunt down the duplicate and fix it at the source. The easiest way to find the duplicate is to create a measure to count the customer ID column, then drop that column and that measure on a table visual, sort by the measure and see which ones come up more than 1.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
KHorseman
Community Champion
Community Champion

Somehow you must have ended up with at least one duplicate in the customer table. You can either use the Remove Duplicates option in the query editor, or perhaps you can hunt down the duplicate and fix it at the source. The easiest way to find the duplicate is to create a measure to count the customer ID column, then drop that column and that measure on a table visual, sort by the measure and see which ones come up more than 1.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




edwardrmiles
Helper III
Helper III

is Sold to Number in Customer Setup Report definitely unique?

 

You can check in the data view. Select the column and it gives you a row count and a distinct values count

 

Yeah. There are 10,650 distinct account numbers. These are all the company account records. I am trying to create filter that I can search by zip or city and populate customers what they have purchased. 

 

The customer setup report is account details and the other individual line by line transactions. 

@DarylM I presume then there are 10,650 rows too?

You suggestion worked. I thought I removed all the duplicates, but there were a few. I removed them in the editor. 

Then I create a calculated column by blending the customer number with the zip code. Then the tables linked. Thanks for your help!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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