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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aodwyer
New Member

Many to one relationship

Hi,

 

I have a report with multiple data sources. I am trying to connect “Datasource – ActiveAdditionsReport” to “Datasource – WonOpportunities” using the fields Company Rec_ID. 

 

The file called “Datasource – ActiveAdditionsReport” shows all client agreements and has multiple duplicate rows, as one client could have 5 different agreements with us.

 

The file called “Datasource – WonOpportunities” had multiple duplicate rows when I imported the database but using PowerQuery M with sorted rows, I have removed all duplicates from this report and left only the newest dated won opportunity per client. 

 

However, when I try to connect these two data sources together, I can’t do a 'many to one' relationship as I get a cardinality error message. 

 

Error messageError message

 

Does anyone know what’s causing this error?

 

I need the “Datasource – ActiveAdditionsReport” to filter the won opportunities report, otherwise any client who doesn’t have a won opportunity against their name won’t appear on my list. 



Any help you can offer me would be greatly appreciated, thanks.

1 ACCEPTED SOLUTION
Watsky
Solution Sage
Solution Sage

Check Datasource – WonOpportunities doesn't have any blanks. Multiple blanks would be considered duplicates.  


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

View solution in original post

5 REPLIES 5
Watsky
Solution Sage
Solution Sage

Check Datasource – WonOpportunities doesn't have any blanks. Multiple blanks would be considered duplicates.  


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

This worked for me. Thanks a million for your help. I didn't think to check the blanks. 

@aodwyer I had the same issue before. I just had to keep telling myself that Power BI is looking at the data in a litteral sense. If two values match no matter if it's an actual value or the inverse, then it's a duplicate. As a best practice you should check this on all of your key columns when you start and remove them. Since you're using them as a key column you would want to remove them.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

amitchandak
Super User
Super User

Does company Rec Id is a unique key in Won Opportunity.

 

TO check but this on Table and drag it again and take count and sort descend on the count. There should not be any two values.

Thanks, I checked this but it was duplicate blank rows that were causing the problem.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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