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
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
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.

Top Solution Authors