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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
V-pazhen-msft
Community Support
Community Support

@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
V-pazhen-msft
Community Support
Community Support

@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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.