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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Compare Two Columns from different tables in many to many relationship

How to compare two columns in a table visual coming from different tables, when their relationship is many to many?

 

PKR_0-1596278441443.png

In above image,

- The column "Supplier Name" is from a fact table.

- The columns "Vendor A" & "Vendor B" are from two different tables.

- The relationship between "Fact table" and "Vendor A" table is many to many.

 

How to compare "Supplier Name" & "Vendor A" and say they are matching or not?

 

Note: Since it is many to many relation, the related function is not working.

3 REPLIES 3
Anonymous
Not applicable

@Anonymous 

RELATEDTABLE function might work.

 

As @harshnathani suggests you should consider converting your model to start schema or use a bridge table for *:* relatioships.

 

harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Generally Supplier Name should come from a  Dimension Table adn should be related to your Vendor A and Vendor B Table.

 

I think you can try convert your model to a Star Schema.

 

Regards,

HN

 

 

 

 

lbendlin
Super User
Super User

what you are asking for is logically impossible.  Many to Many means there can be multiple rows in your fact table with supplier name MARUBENI and multiple rows in your Vendor A table with Vendor MARUBENI.  

 

You will want to reformulate your question, something like "How many times does the supplier name appear in the vendor table ?" so that you can actually get an answer.

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors