Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two Bars in a Bar Chart

Hi all

In my current chart, I have four expressions. 

One is total,

Two, three and fourth are Subtotals

I am getting four bars in the graph.  I would like to have only two bar, one for total and another bar for subtotal which should be stack.

Is it possible to do that in qv?

Any help would be appreciated

6 Replies
orital81
Partner - Creator III
Partner - Creator III

Hi Saaty, As to my knowledge there is no option to set a chart which is partialy Stacked and partialy seperated. Although, there is a workarround: Option 1: Set the Bar Chart to stack. mark the Total expresstion as invisable and show it's value on chart. This way you will have all subtotals in stacked bar and Total as a number. Option 2: Use a bar chart with lines, show stack bar for Subtotals and line for Total. Hope this was clear and helpful.

Not applicable
Author

Thanks for your valuable info Ori.

Option 2 is clear to me, but i didnt get the option 1.

johnw
Champion III
Champion III

Can you post a sample file?  I suspect I can solve it, but I'd need to know exactly what you're after and have some sample data and your expressions and such.

Not applicable
Author

Sure.  PFA for the sample file.

Thanks a lot!

johnw
Champion III
Champion III

Attached is one way.  There might be a better one, but it works.  I created a separate "Count" field with values 'Total' and 'Subtotal'.  I added that as a dimension, then changed the expressions to check the "Count" and only return a value if they should be part of that bar.

If this is what you wanted, though, I'm a little confused.  The total bar just seems unnecessary, as it is always the same height as the stack of subtotals.  It seems like it would be more clear without it.

Not applicable
Author

Sure.  Thanks for the reply John.  Let me look into that and reply back to you!