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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Dean0
New Member

Help linking 2 SQL views

Hi,

 

I am new to reporting writing in general but love the simplicity of Power BI for new comers but also the enhanced features for the more advanced out there 🙂

 

I have two SQL views that when I link them in crystal reports work fine but when I try to link them in Power BI I get the following message:-

 

We cannot creare a realtionship between '_AllOrdersWithRep'[HUID] and '_AllOrderDetails'[UID]. This could be because there is missing intermediate data to connect the two columns.

 

The views were setup by an SQL developer and have worked for him for a long time and also work great in crystal reports.

 

Any idea why they wont link in Power BI in the same way.

 

I hope that all makes sense and any help or direction will be greatly appreciated.

 

Cheers

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

Hi Dean0,

 

Based on my test, this error may occur when meets one of the following conditions.

  • both columns '_AllOrdersWithRep'[HUID] and '_AllOrderDetails'[UID] contain duplicate values
  • one of the two columns contains duplicate values and the other contains NULL value
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ankitpatira
Community Champion
Community Champion

@Dean0 Basically what error means in one of the table there are values which doesn't exist in other table ie either UID or HUID column has values that does not exist in other. What you need to do is ensure is all values from your FK table exist in your PK table.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors