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
shoaib986
Frequent Visitor

Calculation between two tables having many to many relationship

Hi 

 

I have two tables Table_1 and Table_2 with many to many relationship.

 

I just want to do simple calculation of Table_1.Column_1 * Table_2.Column_1 where the two tables are connected by Column_3 with many to many relationship in both directions.

 

Please advise.

 

Thanks in advance.

 

BR

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @shoaib986

To create many to many relationship, you could enable "composite models" feature.

You can enable this by navigating to file > options & settings > options > preview features > and checking off composite models.

Reference:

HOW TO JOIN MANY TO MANY WITH A BRIDGE TABLE IN POWER BI

 

Below is my test for example.

1.png 

note: since for the same value(eg."a")in column3 in table1 and table2, there are many different values in column1 of table1(1,2,3 for "a") and in column2 of table2 (10,11,12 for "b"), when you calculate them, you need to use aggreation function like "sum, max, min" ect.

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.