Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

negative values over bar

Hi All,

Could you suggest how to display both the positive and negative values over bars in the bar chart? In my screenshot the values for the negative values are below the bars..

Thanks a lot

Tommy

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You could take the Fabs() value for the bars, and adjust the bar offsets (using Sgn()) so that the negative bars are correctly positioned. That would place the values above the bars. You might need to use a Combo chart and add the actual values (not absolutes) in a separate expression and use that expression with the text on bars option.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
Not applicable
Author

Or one more question - if I would like to plot the values inside the bars - is there a chance to display them also if the bar is very narrow? Currently it displays for me the values only if tha bar is wide enough for the numbers.

Thanks

Tommy

girirajsinh
Creator III
Creator III

what would be your Y-axis in that case when you show bar with negative in  upper part ?

if you are looking to convert your -negative measure to positive, then you may try function sign() which tells you if its positive or negative and  then you can change it conditionally.

jonathandienst
Partner - Champion III
Partner - Champion III

You could take the Fabs() value for the bars, and adjust the bar offsets (using Sgn()) so that the negative bars are correctly positioned. That would place the values above the bars. You might need to use a Combo chart and add the actual values (not absolutes) in a separate expression and use that expression with the text on bars option.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

>>Or one more question - if I would like to plot the values inside the bars - is there a chance to display them also if the bar is very narrow?


I dont think so.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
girirajsinh
Creator III
Creator III

for putting values inside you can do it by changing these two properties