4 Replies Latest reply on Sep 7, 2013 11:10 AM by John Jose

# How to align show negative sum as positive value on BAR chart

Folk,

We are working on requirement where we have to show negative value on right side of the bar.

Sample Data

Class Name   avg  value

A       Manas    0    -55

A       Manas    0     50

B       Manas    0     51

By normally plotting the graph for class A(BLUE BAR) and B(ORANGE bar) we have got following  but not what we want.

What we want is to move the position of the blue bar on the right side with even if it is having negative value. We are going to hide the x-axis and we will show annotation to denote the negative value.

What we have tried so far is to use SIGN function and try to convert negative value to positive value and then plot it but if we convert negative value to positive value blue bar is becoming huge (e.g for Manas user and class A the sum value will be 50 + 55 = 105 as -55 is converted to positive value)

We are attaching the workbook where sheet2 represents actual problem and sheet4 will show the impact of converting negative value to positive and then plotting the graph.

Any input will be highly appreciated.

• ###### 1. Re: How to align show negative sum as positive value on BAR chart

John,

You mean like this?  I've attached the workbook.  Please let me know if I misunderstood your question.

Regards,

Joshua

• ###### 2. Re: How to align show negative sum as positive value on BAR chart

Or this:

IF ATTR([Class])='A' THEN ABS( SUM( [value] ) )

ELSE SUM([value]) END

If you want this:

--Shawn

Or:

• ###### 3. Re: Re: How to align show negative sum as positive value on BAR chart

Hi Shawn,

I am manage to resolve it in rather complex way. But now I am facing another issue where color of the shape is not coming in black. That is the only thing I am looking at.

I have taken reference from one of the threads given below.

Issue.

Attaching workbook where this issue is happening.

• ###### 4. Re: How to align show negative sum as positive value on BAR chart

Shawn,

I am able to resolve the issue. mistake was I have kept the name dimension on color shelf instead of detail shelf.

After changing it color is also changed to black.

Anyway thanks for your support. It was very help ful.