# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

## 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)?

1 Solution

Accepted Solutions
Not applicable

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

Try this

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

8 Replies
Not applicable

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

Try this

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

MVP

## 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

Not applicable

## 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.

Not applicable

## 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

MVP

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

Hi,

Use Expression1um(Chocolates)

Expression2um(Total Chocolates)-Sum(Chocolates)

Celambarasan

Not applicable

## 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

Not applicable

## 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

Not applicable

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

Thanks again Marc