March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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?
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:
DAX:
NewColumn = [DocTotal] - MeasureValue
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.
DAX:
Difference = SUM('YourTableName'[DocTotal]) - MeasureValue
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.
hi, @rakeshmistry1
try below for measure
measure1 =
MIN('Table'[doctotal)-[Measure]
try below for column
column =
'Table'[doctotal]-[Measure]
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
22 | |
19 | |
16 | |
9 | |
5 |
User | Count |
---|---|
37 | |
29 | |
16 | |
14 | |
12 |