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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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.

Top Solution Authors
Top Kudoed Authors