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

Bar Chart negative values

Hi All,

I have a requirment ... i need to shown budget, revenue and variance in a bar chart.

Variance will be negative always .... see below image

Capture1.JPG

but my client wants to see variance bar on the postive values side of bar chart . But the values on data points should be negative number . See image below

Capture2.JPG

To be simple my requirment is  the variance value (i.e 5) in the second chart should be negative number. Is it possible ?

Please find attached qvw

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III

You can use the dual function to add a display value to the result value. See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

8 Replies
jerem1234
Specialist II

Not sure if it is possible, maybe someone else has something. But a possible remedy might be just creating a text box with expression =sum(Revenue) - sum(Budget)

and then placing it where the 5 is on your second chart, then just uncheck values on data points on your chart for Variance.

The downside is that it is a second object and if your bar chart resizes or moves around, the placement of the textbox will be wrong.

You would also have to make sure your text box is on top layer. You would have to change your text pop-ups accordingly (since it would display the variance as being 5) by maybe unchecking text as pop-up for Variance or by creating a new expression just for a text pop-up.

Gysbert_Wassenaar
Partner - Champion III

You can use the dual function to add a display value to the result value. See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

Thanks for your reply. I need to show that in money format rounded to two decimals( i.e as $-5.00) .

Can i use num infront of dual function ? I tried but not working

Gysbert_Wassenaar
Partner - Champion III

Works for me: =num(dual(Column(2) -Column(1),Column(1) -Column(2)),'$ #.00')

Or you can simply change the Number Format setting for the expression on the Number tab to Money and adjust the format string to your needs.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

when i use your expression  =num(dual(Column(2) -Column(1),Column(1) -Column(2)),'$ #.00')

the values on data points which are supposed to be negative are turning postive .

Can you attach the qvw for me ?

Not applicable
Author

Hai Srinu,

Try to this setup chart Properties-> Axes Tab ->Scale 

3.bmp

This is  helps for you.

Regards,

Senthil

Gysbert_Wassenaar
Partner - Champion III

Ah, right. The num function just changes the formatting, same as the dual function. Try this instead: =num(Column(1) -Column(2),'$-#.00')


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks ... That worked for me