Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Register for Events and Webinars directly from Qlik Community: http://bit.ly/2Vpnenx
Highlighted
Not applicable

100% Stacked bar chart

Hi,

Does anyone know how to create a '100% stacked bar' chart in a way, that tool compares the % not to the total, but to the reported groups? I.e.: sum(Product "X")=100%

Product "X"Product "Y"Product "Z"Grand Total
Approved1,427,075267,7171,189,9072,884,699
Rejected847,693765,022817,5932,430,308

And is it possible in any way to have both, the values and the % visible in the same chart? Or at least add the values into a % bar chart? Many thanks for your help!

4.PNG.png

Message was edited by: Prakash Pawar

1 Solution

Accepted Solutions
Highlighted

Re: Re: Re: 100% Stacked bar chart

or maybe this one?

QlikCommunity_Thread_111482_Pic5.JPG.jpg

regards

Marco

View solution in original post

5 Replies
Highlighted
Not applicable

Re: 100% Stacked bar chart

Hey Prakash, can you attach a sample file if possible.

I think you can add another expression and make it text. Then you would have a bar in % and a value in text.

Highlighted

Re: 100% Stacked bar chart

Hi Prakash,

maybe you find this solution helpful?

QlikCommunity_Thread_111482_Pic1.JPG.jpg

Chart Dimensions:

  1. Product
  2. Status

Chart Expression:

=sum(Value)/sum(Total<Product> Value)

The trick is to only total all chart dimension except the Product dimension, which in this case leaves only the Status dimension.

Load script:

CrossTable(Product, Value)

LOAD F1 as Status,

     [Product "X"],

     [Product "Y"],

     [Product "Z"],

     [Grand Total]

FROM

[http://community.qlik.com/thread/111482]

(html, codepage is 1252, embedded labels, table is @1);

QlikCommunity_Thread_111482_Pic2.JPG.jpg

I had to transform your table a bit (crosstable load).

Hope you don't mind

regards

Marco

Highlighted
srchilukoori
Valued Contributor

Re: Re: 100% Stacked bar chart

Chek the option 'values on data points' on the expression tab and also the 'Plot values inside the segments' in the presentation tab.

Highlighted

Re: Re: 100% Stacked bar chart

one more flexible way, using a calculated dimension that includes the rejected value:

=Product&chr(10)&num(aggr(Sum({$<Status={'Rejected'}>}Value), Product), '#,##0')

QlikCommunity_Thread_111482_Pic3.JPG.jpg

QlikCommunity_Thread_111482_Pic4.JPG.jpg

regards

Marco

Highlighted

Re: Re: Re: 100% Stacked bar chart

or maybe this one?

QlikCommunity_Thread_111482_Pic5.JPG.jpg

regards

Marco

View solution in original post