Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gerhardl
Creator II
Creator II

Stacked Bar Charts

Hi,

I am having trouble with something that should be easy.

I have a two fields named "Value of Purchases in Cycle" and "Value of Payments in Cycle". I need their totals.

Each account belongs to a certain company, the field is called "Product Name".

I want a very simple bar chart showing total purchases Vs. Total Payments, so 2 bars only - but I want each bar to be stacked by product, i.e. a different color for each different company.

So my vertical axis must show the values (sum of purchases/payments) and then there must be two bars, one for total purchases, one for total payments, but stacked by product.

Why am I finding this impossible? I can only get the to stack the purchases and payments on top of each other, with the different payments next to each other!

3 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Can you post a simple example .qvw as that should be possible to achieve.

All the best,

Matt - Visual Analytics Ltd

gerhardl
Creator II
Creator II
Author

Hi Matt,

I've attached an example with the three relative fields. I would like a chart as the one I have added in the file, but instead of having the different products as dimensions and the purchases and payments as the two different colors, I want only two bars - total purchases and total payments. Then I want each bar stacked with different colors for each product.

I want to do this in the file itself (with some sort of calculated dimension or expression - I DO NOT want to crosstable or edit my data in any way.

Thank you,

G

matt_crowther
Luminary Alumni
Luminary Alumni

It seems that 'dual stacked' charts aren't possible - as soon as you add the second expression the whol thing comes tumbling down.

This is as close as I can get:

This is created using 2 charts overlayed using 'persistent colours' to ensure we only need one legend and forcing the axis to be the same so again we only need one.

Total workaround I know.

.qvw attached for info.

Hope that helps in some way.

Matt - Visual Analytics Ltd