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
Anonymous
Not applicable

Many to Many Relationship

Hello,

 

I am working on a project that will detect past quotes that we give to our customers. The tool uses two datasources, a quote table which contains all quotes (whether we did business with that customer or not) and a table which contains sales information about the quotes. However, the sales table contains only those quotes in which our business has won/made a sale on. 

 

The issue I am having is the many to many relationship. I want to join the two tables together via the unique quote ID (an 8 character long number).

 

For example:

 

Quote Table:      Won/Lost:   Sales Table:

67881934               Lost

67824431               Won        67824431

67845519               Won        67845519

67802298               Lost

 

There are obviously many more quotes in the quote table than in the sales table. I don't understand why I am getting many-to-many. All I want to be able to do is have a one-to-one or one-to-many relationship between these two tables so that the data will process faster, and so that I get much more details about the quotes - won or lost.

 

I can provide a sample dataset if need be.

 

Thank you

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

You can consider to extract 'quote id' from two tables and remove duplicate records. Then you can use this table as bridge to link two tables with both 'many to one' relationship. It should help mapping records more correctly.

Quote Bridge =
DISTINCT (
    UNION (
        VALUES ( Table1[Quote] ),
        VALUES ( Table2[Quote] )
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

You can consider to extract 'quote id' from two tables and remove duplicate records. Then you can use this table as bridge to link two tables with both 'many to one' relationship. It should help mapping records more correctly.

Quote Bridge =
DISTINCT (
    UNION (
        VALUES ( Table1[Quote] ),
        VALUES ( Table2[Quote] )
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.