Forum Discussion
Ahollis
2 years agoRegular Visitor
Clustered bar chart negative value
Hello, any way to adjust the negative value as an absolute value for my bar chart below without impacting the source data? i would like to see the bar to the right rather than the left....
v-weiyan1-msft
2 years agoCommunity Support
Hi Ahollis ,
Currently Power BI does not support displaying negative values as positive (absolute) values directly on bar charts without modifying the source data. However, you may consider trying the following method to achieve a similar visualization.
My Sample:
Please try code as below to create measure.
MTD_Value =
VAR MTD_ = SELECTEDVALUE('Table'[MTD])
RETURN
ABS(MTD_)
Result is as below.
To visually distinguish between original positive and negative values, you can apply conditional formatting:
1. Use the following code to create a measure.
Measure =
VAR MTD_ = SELECTEDVALUE ( 'Table'[MTD] )
RETURN IF ( MTD_ > 0, 1, 0 )
2. Then select your visual object and do the following in the Visualizations pane.
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.