Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked bar chart variant

Hi

I want to create a bar chart but i have three measures, two of which i want as a stacked bar chart and the other a straight bar chart

Example

Year     Budget     Expenditure     Commitments

2015     500000     200000            150000

So in a bar chart I want to see one bar with Budget 500000

In the Second Bar chart I want to see Expenditure and Commitments stacked on top of each other with a different color.for each

Is it possible to do this, or would I just need to create a bar for each?

1 Solution

Accepted Solutions
datanibbler
Champion
Champion

Hi Avinash,

yes, that would of course work too - might be clearer, that depends on who is supposed to be working with this.

The way I suggested, however, is possible - pfa the solution.

Best regards,

DataNibbler

View solution in original post

21 Replies
datanibbler
Champion
Champion

Hi,

that is possible, but only with a trick - you have to add a second dimension to your bar- or combochart (and correspondingly add some set_expression or IF_clause to your expressions).

HTH

B est regards,

DataNibbler

avinashelite

As per my knowledge , we can set the chart completely as stacked or independent bars but we don't have option of selective stack and bar show. You need to go with all the expression as stacked or individual bar of each one .

Hope this helps you

Not applicable
Author

Can you maybe create me a example of what you mean?

Not applicable
Author

Thought this could be a tough one if not impossible, would like to see what DataNibbler has to offer

avinashelite

ya, will see . I am also equally interested to see, is their a way to do that . Lets wait for DataNibbler

Not applicable
Author

Hi,

i have already asked some thing like this,

Cobain Stacked and Grouped expression in one chart

but it seems that there is no straight way to do it,

you can do it using tow charts, one of them will be transparent

datanibbler
Champion
Champion

Hi,

I had the requirement a few times to have two expressions stacked and a third one beside it - not stacked on the first two.

It is only possible in a combochart to start with.

Unfortunately it's been a while since I did this, so I don't remember all the details.

But I think that is it: You need a combochart, then you add two dimensions to it and then you have to somehow make sure - via IF_expressions or so - that two of your expressions are displayed on the same value of the secondary dimension - thus they will automatically be stacked - and the third one is displayed on the other value of the secondary dimension.

Best regards,

DataNibbler

avinashelite

one alternate solution would be, use combo chart and create one expression with the Bar representation option and other with the line, this way you can show both in the same chart

datanibbler
Champion
Champion

Hi Avinash,

yes, that would of course work too - might be clearer, that depends on who is supposed to be working with this.

The way I suggested, however, is possible - pfa the solution.

Best regards,

DataNibbler