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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
MusaabYaqub
New Member

Unable to convert positive values to blank while negative to positive

Trying to convert negative values into positive and positive values as blank. Challenge is that the Total still considers the blank values. How to not have it consider the blank values? The calculated column option would be a good one but calculated column doesnt take a dax measure as input. 

For example, the RC Volume Difference total considers the 32.53 value and I converted it to 0 but still the total considers it. Dont know how to solve this problem.

 

MusaabYaqub_0-1709658509814.png

 

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@MusaabYaqub 

 

use this pattern in your measure : 

 

measure = 

var ds = 
addcolumns(
values(datetable[date]) , 
"rc vol diff" ,
switch(
true() , 
[your measure] < 0 , abs([mesaure]) , 
[your measure]>0 ,  [measure] * -1 ,
[your measure]
)

return 
sumx ( ds, [rc vol diff] ) 

 

let me know if this works for you . 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @MusaabYaqub 

 

Based on your description, I have created a measure and a new column to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_0-1709704045297.png

Measure:

New RC Volumn Difference1 =

CALCULATE ( MAX ( 'Table'[RC Volumn Difference] ) )

New Column:

New RC Volumn Difference =

VAR _selectedValue = 'Table'[New RC Volumn Difference1]

VAR _RCVolumnDifference =

    IF ( _selectedValue <= 0, ABS ( _selectedValue ), 0 )

RETURN

    _RCVolumnDifference


Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

 

 

Daniel29195
Super User
Super User

@MusaabYaqub 

 

use this pattern in your measure : 

 

measure = 

var ds = 
addcolumns(
values(datetable[date]) , 
"rc vol diff" ,
switch(
true() , 
[your measure] < 0 , abs([mesaure]) , 
[your measure]>0 ,  [measure] * -1 ,
[your measure]
)

return 
sumx ( ds, [rc vol diff] ) 

 

let me know if this works for you . 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors