16 Replies Latest reply: Aug 22, 2012 4:45 PM by nicole00

How to get negative data point values to show on top for a bar chart?

Qlikview 11

1. How to get negatve data point values to show on top for a bar chart?

When I select 'Values on Data Points', the positive values show up on top, but not the negative values.

My scale is showing only 0 to 100%.  So the negative value data points do not display.  I wouldn't mind showing the negative values however I don't know how to make the scale different for negative values (<0) and positive values (>0).  The negative values in my data set are as low as -3,000%, however my highest positive value is 100%.  So the scale

• Re: How to get negative data point values to show on top for a bar chart?

Can u send the sample data

• Re: How to get negative data point values to show on top for a bar chart?

Here

• Re: How to get negative data point values to show on top for a bar chart?

You could try something like

=dual(Value,if(Value<0,0.000001,Value))

as expression.

• Re: How to get negative data point values to show on top for a bar chart?

Thanks for your response.  But my real data set has negative decimal numbers.  The scale is based on percentages actually.  But, I was not able to load the decimal values in the load statement.  The values showed up as text.   I didn't think it would make a difference.

How do you format the VALUE field to recognize the value as numbers if they are decimals?

I can attach another sample when I figure that out???????

• Re: How to get negative data point values to show on top for a bar chart?

Here is a copy of the sample with the load * inline script that shows the decimal values.

• Re: How to get negative data point values to show on top for a bar chart?

nicole00,

I've attached best I could get.

Regards,

Stefan

• Re: How to get negative data point values to show on top for a bar chart?

Thanks for trying! Your solution shows commas, which will not work.  Also my real data set reflects a maximum of 100% (or 1) and minimum of any negative percentage. For example max 100% (or 1.0) and a min -3,247% (or 32.47).

Qlikview seems to be so complicated!!!!!

• Re: How to get negative data point values to show on top for a bar chart?

Yes, formatting could be a lot simpler, I agree.

My previous solution showed comma as decimal separator, because that's what was specified in your original sample file.

I changed that in attached file and added a huge negative value.

• Re: How to get negative data point values to show on top for a bar chart?

If I had a comma in my original data set then it shouldn't be, it was a typo.

The only time a comma should show up is in the presentation when showing -3,247%.

I tried using your example (top right), but the negative values just show 0.0%.  My real data set is not based on a load inline script.

The Value is based on an expression = ((sum([Balance])/sum([Ceiling Amt]))

So I inserted my expression everywhere it says Value and I get 0.0%?????

• Re: How to get negative data point values to show on top for a bar chart?

BTW, I get 0.0% just for the negative numbers.

What is that last part of the expression supposed to do 0.000010?

I don't understand why I am not able to get to work?

• Re: How to get negative data point values to show on top for a bar chart?

I figured out why I was getting 0.0% instead of a negative value %.  I had the number formatted, so I changed it to expression default.

I have added the hidden field but now my sort order is all wrong?

• Re: How to get negative data point values to show on top for a bar chart?

I think this would be a great solution if there was a way to sort all the values (see example)?

The sample I provided worked out because the dates increased with the value amounts.

Unfortunately, my real data set is not going to work out that way.  Any help would be greatly appreciated.

• Re: How to get negative data point values to show on top for a bar chart?

Just try a sort by expression in sort tab using

=Value

• Re: How to get negative data point values to show on top for a bar chart?

No luck, I have already tried that.

• Re: How to get negative data point values to show on top for a bar chart?

Seems to work at my side, see attached. I am using QV11.

It should also be possible to sort by y-value, using this as hidden expression:

=num(Value,'#0.0%')

and set static min for axis scale to 0

• Re: How to get negative data point values to show on top for a bar chart?

Awesome thank you!