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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
akrupa
Regular Visitor

Data modeling

Hello!

I wold like to make a subtraction two columns in a different tables. This columns contians amount, how can I do this in Power BI?? I can't do this in my data source because it is directly from Business Central. I created a relationship between two tables but not using columns that contain amount because this is not possible.  Is there any solution??? 

 

Moreover, I must create a table report, will Power BI handle it?

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @akrupa ,

 

According to your request, I have created 2 tables, which are shown as below:

444.png555.png

 

And I create a relationship between the 2 tables using column “id” as primary key:

666.png

 

Then you have 2 ways to make a subtraction between the two columns:

1.create a measure:

 

  measure = CALCULATE(SUM(Sheet2[Amount]))-CALCULATE(SUM(Sheet3[Amount2]))

 

2.create a calculated column:

 

   subtraction = 'Sheet2'[Amount]-CALCULATE(SUM(Sheet3[Amount2]))

 

ALL  the above 2 ways will finally show the same as below when you put them in a table visual:

777.png

 

As for the related .pbix file you can turn to the URL:

 https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EdHeFvOa845Goc82mDtDd...

 

Hope this would help.

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @akrupa ,

 

According to your request, I have created 2 tables, which are shown as below:

444.png555.png

 

And I create a relationship between the 2 tables using column “id” as primary key:

666.png

 

Then you have 2 ways to make a subtraction between the two columns:

1.create a measure:

 

  measure = CALCULATE(SUM(Sheet2[Amount]))-CALCULATE(SUM(Sheet3[Amount2]))

 

2.create a calculated column:

 

   subtraction = 'Sheet2'[Amount]-CALCULATE(SUM(Sheet3[Amount2]))

 

ALL  the above 2 ways will finally show the same as below when you put them in a table visual:

777.png

 

As for the related .pbix file you can turn to the URL:

 https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/EdHeFvOa845Goc82mDtDd...

 

Hope this would help.

Thank you @v-kelly-msft  ! 

Hi @akrupa ,

 

It's pleasant that your problem has been solved, could you please mark the reply as Answered?

Many thanks.

 

 

Best Regards,

Kelly

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.