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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PreetiSahu321
Helper I
Helper I

Subtract two columns from different table using DAX in power bi

Hello Power BI Community Members,

 

Recently, I was working with Power BI DAX. As per my requirement, I have to subtract two different columns of values from two different tables. Let me explain to you properly so that you can understand easily.

 

I have one table named: "Orders". This Orders table has one column as "Sales doc." whose data type is the Whole number. Similarly, I have another table named: "Sales" and this has another column as "Order" whose data type is the Whole number.

 

As per my requirement, I have to subtract the values from the Sales doc. (from Orders table) to Order (from the Sales table). As I am new to Power BI, I don't have any idea to subtract from different tables using DAX. Please, can anyone suggest to me what I have to do?

 

Thanks in Advance!!!

2 REPLIES 2
Nathaniel_C
Community Champion
Community Champion

Hi @PreetiSahu321 
If I understand your issue, try this.

Subtract measure = SUM(Orders[Sales Doc])-Sum(Sales[Order])

Sum and subtract.PNG

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Nathaniel_C ,

 

I have applied the formula and it is giving me the exact value. But one more thing I want to know is, there is one common column in both Orders and Sales tables i.e. BillDate (Date and Time Datatype). As per my requirement, I want to subtract the measure per monthly basis. Let me explain to you properly.

 

You can see below are two tables as Orders and Sales. I want to subtract the values from Net value to Sales US$ of the current month. As this is November month is going on, So it will subtract the values for the current month only. i.e. (132454-370.80=132,083.2)

 

1.png

 

Can you suggest me if anything I have to do else?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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