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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Matrix, operations between columns

Hello

I have created a column which holds the Marging as a result of the substraction of ActualSales-ActualCost column. 

What you see in the picture is the values of a matrix.  If you see in bolds what shows there is the min of the margin.  I would like it to show actually the value (for ex 0-8370.92=8370.92) and not -1483.20 which is the min value of it in the tree.

I checked the options but I have otheres like max, average etc.  I just want the real value of the substraction there...

is this possible? in the worst of the cases I dont want to show anything in that column for the bolds section. Could some one advice? 

 

borrar.PNG

 

Thanks

Angelica.

1 ACCEPTED SOLUTION

ok I got it!

I just chose "Sum" instead of min and it did what I wanted.

thanks for your help.

 

Angelica.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

I doubt something to do with the row context. Can you share the formula

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amitchandak

the formula for the Margin column is as simple as Margin=[ActualSales-ActualCost]

 

Thanks.

 

Angelica.

ok I got it!

I just chose "Sum" instead of min and it did what I wanted.

thanks for your help.

 

Angelica.

VasTg
Memorable Member
Memorable Member

@angelikamariae 

 

You should use ABS()..

 

Measure = 
VAR MARGIN =ActualSales-ActualCost
RETURN ABS(MIN(MARGIN))

 

If it helps, mark it as a solution

Kudos are nice too

Connect on LinkedIn

HI Super User

Your function seems to return the abs value of Margin.  My problem is not about the positive or negative sigh, but the value itself. I dont want the min or max value of the substraction in the tree, I want the substraction result.

 

Anyways I tried the solution you gave me but I am getting this message:

 

The MIN function only accepts a column reference as an argument.

 

I even tried to do this:

 

Measure =
VAR MARGIN =[ActualSales]-[ActualCost]
RETURN ABS(MIN(MARGIN))
 
and still the same message.
 
Angelica

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.