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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
KristinaSp
Helper I
Helper I

Sumx two tables with isnumber search

Hello,

Please help me to solve this issue. I gave two related tables ( i made a small excel example below).

I need to sum delivered amount from another table. 

 

If the information would be in one table, the formula could be like below, but information is in two tables that cannot be merged.

 

IF( Calculate( sum(delivered amount), isnumber(search(contracts[contract number], deliveries[contract number]) =  TRUE) > contracts [amount]],

contracts[amount],

Calculate( sum(delivered amount), isnumber(search(contracts[contract number], deliveries[contract number]) =  TRUE))

 

KristinaSp_0-1628598218870.png

 Please, help ne with this issues.. so mush time spent on it..

 

Best wishes,

Kristina

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@KristinaSp 

Try follow the steps.

 

1. First split table 2 into rows. 

Vpazhenmsft_2-1628748532116.png

 

2. Create a relationship.

Vpazhenmsft_3-1628748591910.png

3. Create a column. 

Column =
var sum_ = CALCULATE(SUM('Table (2)'[Delivery amount]),ALLEXCEPT('Table','Table'[Conttract nuimber]))
Return IF(sum_>100,100,sum_)

Vpazhenmsft_4-1628748623383.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@KristinaSp 

Try follow the steps.

 

1. First split table 2 into rows. 

Vpazhenmsft_2-1628748532116.png

 

2. Create a relationship.

Vpazhenmsft_3-1628748591910.png

3. Create a column. 

Column =
var sum_ = CALCULATE(SUM('Table (2)'[Delivery amount]),ALLEXCEPT('Table','Table'[Conttract nuimber]))
Return IF(sum_>100,100,sum_)

Vpazhenmsft_4-1628748623383.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.