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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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