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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mhusaein
Regular Visitor

create calculated column based on 3 tables

i have 3 tables as follows 

table 1 : 

C3FFFDD6-6DD2-4C3D-AFF9-4954FF00A84F.png

 

table 2 : 

7320B81F-E2B6-445B-96FE-9F9E1BBB489F.png

 

table 3 : 

37FD00F9-B128-41AF-BEDC-8B59709510EB.png

 

i need to get the sum of table1[value] and instert it as a column in table[3] as i will make extra calculations after this

Relations are as follows:

table1[code] & table2[code] , many to one.

table2[type] & table3[type] , one to many.

 

id column in table1 and table 3 has duplicates 

 

 

1 ACCEPTED SOLUTION

@mhusaein 

Please try

CalculatedColumn =
SUMX (
FILTER (
CALCULATETABLE ( table1, CROSSFILTER ( table2[type], table3[type], BOTH ) ),
table1[id] = table3[id]
),
table1[value]
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @mhusaein 

what are the cardinalities of these relationships? Which ones are active and which are in inactive?

Hi @tamerj1 , i updated table 2 , doesn't contain an id column now.

also added more details about the tables relations in the original post

@mhusaein 

Please try

CalculatedColumn =
SUMX (
FILTER (
CALCULATETABLE ( table1, CROSSFILTER ( table2[type], table3[type], BOTH ) ),
table1[id] = table3[id]
),
table1[value]
)

thanks @tamerj1  it worked perfectly 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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