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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rakeshmistry1
New Member

MAKE SUMMARY / DEDUCTION OF MEASURE VALUE FROM COLUMN VALUE IN POWER BI DAX IN DIRECT QUERY MODE

Hi,

 

I have one Table which hace one Column DocTotal and One Measure bringing value from other table. And I want to substract Measure value from Column DocTotal. 

 

How to do it?

3 REPLIES 3
123abc
Community Champion
Community Champion

Certainly! To subtract a measure value from a column value in Power BI using DAX, you can create a new calculated column or use a measure to perform the subtraction.

Here's how you can do it:

Using a Calculated Column:

  1. Create a new calculated column: Go to your table in the Data view.
  2. Right-click on the table name and select New Column.
  3. Use the DAX formula to subtract the measure value from the DocTotal column. Let's say your measure is named MeasureValue, then the formula would be:

DAX:

NewColumn = [DocTotal] - MeasureValue

 

Using a Measure:

If you prefer to use a measure (which is more dynamic than a calculated column), you can create a new measure to calculate the difference between the DocTotal column and the measure value.

  1. Go to the Modeling tab in the Power BI Desktop.
  2. Click on New Measure.
  3. Enter the following DAX formula:

 

DAX:

Difference = SUM('YourTableName'[DocTotal]) - MeasureValue

 

  1. Here, replace 'YourTableName' with the name of your table and MeasureValue with the name of your existing measure.

Remember, the approach you choose (calculated column vs. measure) depends on your specific requirements. Calculated columns add data to your table, while measures are calculated on the fly based on the context of your report. If you want the subtraction to be dynamic and change based on filters or slicers, then using a measure is more appropriate.

 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Hi Thanks for your reply. @123abc & also @Dangar332 . What is happening is as below..

 

When I try new column with total doc - measure it says that its can't work in direct query mode.

And when I try measure - it gives error that - MIN function only accepts column ref as an argument

 

So both solutions I tried but its not working.

Dangar332
Super User
Super User

hi, @rakeshmistry1 

try below for measure

 

measure1 =
  MIN('Table'[doctotal)-[Measure]

 

 

try below  for column 

column =
 'Table'[doctotal]-[Measure]

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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