8 Replies Latest reply: Apr 17, 2012 2:27 PM by cc cc

# Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Hi,

I have a Bar chart with 1 dimension and 2 expressions.

For example:

Dimension = Chocolate (Black, white,...)

Expression1 = Number of chocolate available for the color

Expression2 = Total number of chocolate available

I am trying to get the following rendering:

# = Bar for Expression1

+ = Bar for Expression2

0 2   5                  15

Black   #####++++++++++

White   ##+++++++++++++

Black   #####+++++++++++++++

White   ##+++++++++++++++

How do I tell Expression2 bar to start at 0 and not after Expression1 bar ends (no stacking)?

• ###### Re: Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Try this

if(expression2=0,0,expression2-expression1)

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Hi,

Check whether you used the option in the Properties-->Style Tab-->under subtype use Grouped instead of stacked.

Celambarasan

• ###### Re: Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

@Marc: Thanks it works. Isn't there a "cleaner" way to do that?

@Celambarasan: With subtype "Grouped" the 2 expressions are next to each other, Expression1 does not cover Expression2. I am basically trying to do a stacked bar chart where all expressions results starts at 0.

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

If expression 2 is always the total of the charts expression1 then you should be ok with a simple

Expression2 - Expression1

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

I was more thinking of a check box or a parameter I would have missed instead of using a formula

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Not that I am aware of. The "Stacked" option just means stack, not overlay. To get what you want you will always have to subtact one of the expressions from the total expression

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Thanks again Marc

• ###### Bar Chart: 1 Dimension + 2 Expressions = 1 Bar/Dimension

Hi,

Use Expression1:Sum(Chocolates)

Expression2:Sum(Total Chocolates)-Sum(Chocolates)

Celambarasan