cancel
Showing results for
Did you mean:

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

Anonymous
Not applicable

## Calculate the difference between 2 columns in 2 separate tables

Hi there.

The screen below shows 2 matrix (from 2 different tables).  I would like to create a 3rd matrix (in the same format as the 1st 2 matrix) whereby I can show for each financial year, the difference between the approved amount and the committed amount.

Any suggestio would be much appreciated.

Thanks.

1 ACCEPTED SOLUTION
Community Support

Hi@irisyeong

You can do these like me as below:

Step 1:

Create relationship between two table by year like this:

Step 2:
```Measure =
CALCULATE (
SUMX (
Table1,
Table1[Qty]
- CALCULATE (
SUMX ( RELATEDTABLE ( Table2 ), Table2[Qty] ),
FILTER ( Table2, Table2[ComFS] = Table1[FundingSource] )
)
)
)```
Step 3:

Result :

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Community Support

Hi@irisyeong

You can do these like me as below:

Step 1:

Create relationship between two table by year like this:

Step 2:
```Measure =
CALCULATE (
SUMX (
Table1,
Table1[Qty]
- CALCULATE (
SUMX ( RELATEDTABLE ( Table2 ), Table2[Qty] ),
FILTER ( Table2, Table2[ComFS] = Table1[FundingSource] )
)
)
)```
Step 3:

Result :

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks Lin.  It worked.  Much appreciated.

Helper I

Hi,

I have something similiar. I want to show difference between this two table on a month with graphics preview.

Can you help me ?

Helper I

Helper I

In this case I want to show the diferene for each parameters graphically.

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors