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
garycarters
Helper I
Helper I

Creating relationships between two tables.

Hi 

 

I'm trying to achieve a relationship between 3 tables - customer, quote and contract.  

 

For each customer, I want to report on items from both of the two child tables.

 

Customer is related to both the quote and contract tables in a straightforward 1 to many case.  However the complication is the quote and contract tables also need to be linked, to identify the associated quote for a contract i.e. I'm getting a triangular relationship.  But, PowerBI won't let me have two active relationships from the customer table (ambiguity).

 

Can I do this in PowerBI?

1 ACCEPTED SOLUTION
BobBI
Resolver III
Resolver III

 

Hi,

 

to resolve this issue , you can copy your Quote table, stripout all columns except Quote id and description , link this table with customer table. your data model would look like this after the changes. if your table relationships looks different please share table images with related fields.

 

sampe schema.JPG

Cheers!,

ss

View solution in original post

8 REPLIES 8
BobBI
Resolver III
Resolver III

 

Hi,

 

to resolve this issue , you can copy your Quote table, stripout all columns except Quote id and description , link this table with customer table. your data model would look like this after the changes. if your table relationships looks different please share table images with related fields.

 

sampe schema.JPG

Cheers!,

ss

I'll give it a try.

chotu27
Post Patron
Post Patron

@garycarters DO the Union of quote table and contract table so that you can identify the quote to contract per customer

Anonymous
Not applicable

This is possible. You may just not have been able to figure out why PBI is not letting you do it.

 

What is the error message you are getting?

Capture.PNG

Hi garycarters,

 

As the issue mentioned, you can created a one-many relationship between table 'customers del' and 'deltickhdr', so you shouldn't add a new relationship between table 'bidhdr' and ''customers del'' because you already have a one-many relationship between table 'bidhdr' and 'deltickhdr', this may cause ambiguity when you try to filter table 'deltickhdr' using 'customers del', I would recommend you delete one of the relationship above or change the table structure you have. 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

Try changing the cross filter direction to 'bidirectional'

 

I presume you mean between quote and contract?  

 

Tried and it didn't work, same message.

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.