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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
stangellapally
Frequent Visitor

Unable to create relationships between tables from SQL Server source

 Hello,

 

I have started uisng Power BI Desktop application recently and trying to create some reports using the application. In that process, I am importing some table from 'Get data- SQL Server source'. Once all the table that were imported I tried to create relation ships between the 'Manage Relationsips option' or 'Create Relationships', for some I was sucessfully able to map the tables and for others even their is a common column it doesnt allow me to map. It say ' its missing some connections' when tried thru or ' relationships between these two columns must have unique values'. The columns that I mapped works when used joins in SQL but Power BI is not smar enough to map it so I tried mapping it manually. Not sure if any had a similar issue? If so can you please suggest me any work around?

 

Thanks

 

 

Tango
4 REPLIES 4
Greg_Deckler
Super User
Super User

You need unique values on one side of the relationship. Often, you create a separate query and table with only distinct values and map (relate) everything to that. Power BI is pretty smart about transitive relationships.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

I am creating a this report for Users who need whole universe of data and they want to filter out the values themselves. So they asked used to give all the columns requested from multiple tables.

 

So their is no work around with out us creating a separate query?


@smoupre wrote:

You need unique values on one side of the relationship. Often, you create a separate query and table with only distinct values and map (relate) everything to that. Power BI is pretty smart about transitive relationships.


 

Tango

smoupre have you seen any benefit of using one query like he has now and referencing it then using M to get distinct values for this table instead of two queries?

pqian
Microsoft Employee
Microsoft Employee

@kazlik From an evaluation POV it doesn't really make a difference. However, if you reference the query instead of duplilcating it, any changes to the source query will affect the dependents. People often use this to build a report against development server then migrate the source query over to production. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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