Forum Discussion

thomas_coltrain's avatar
thomas_coltrain
Frequent Visitor
5 years ago

Issue with Subtracting 2 columns that are in different fields

Hey everyone,

 

I am absolutely stuck on how to get the value for subtracting 2 columns from 2 different fields.   I am trying to subtract  Job_Planning_Lines'[Total_Price] - Posted_Sales_Invoice_ExcelSalesInvLines'[Total_Amount_Excl_VAT]

 in Business Central, I have renamed Total price to Billable Total Price and Total Amount to Invoiced amount Pre Tax.  Here is what the #s looks like on a simple job in which the subtracted value should equal 0.

As you see here when I applied the measure 

SUM('Job_Planning_Lines'[Total_Price]) - SUM('Posted_Sales_Invoice_ExcelSalesInvLines'[Total_Amount_Excl_VAT])
I get this below, it just has the total price and not showing the correct value which should be 0 in the column Total price minus total_amount.

Here is a SS of my relationships below

Any help would be greatly appreciated!!!
Thanks,

Thomas