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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LBarto90
Regular Visitor

Calculate Difference from different summed/not summarized tables

Hey,

 

as I am new to DAX I cant figure out how to solve my problem and I would appreciate your help very much.

 

I d like to calculate the difference between two colomns from two different tables.

 

It should work like this:

 

"Volumen aktuell" (summed, table 1) - "Haushaltsbudget" (not summarized, table 2)

 

2023-01-26 11_56_14-Projekt-Cockpit - Power BI Desktop.png

 

 

 

 

 

 

 

 

I tried Difference = SUM(Table1 [Volumen aktuell]) - SUM(Table 2 [Haushaltsbudget]) but that didnt work.

 

I hope for your help.

 

Kind regards

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @LBarto90 ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure = var _1=SUM(Table1[summe von volumen aktuel])
var _2=SUM(Table2[haushaltsbudget])
return
_1-_2

vpollymsft_0-1675057686342.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

krishna0
Helper II
Helper II

Hello! In which way are the two tables related to each other? Does your Table1 contains rows per Investition number, which need to be summed first and then sum from table2 for each row should be substracted? How the data actually looks?

 

BR

Both tables contain the Investition number, they are linked via the relationship management.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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