Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked bar chart

I wonder if anyone can help me with a stacked bar chart to show overall satisfaction?

The column in my data has the responses: Satisfied, Neither, Dissatisfied.

I just want to show the % of each response in a bar (totalling 100%). This is easy to do as a pie chart but I can't work out how to do it as a bar chart.

Many thanks.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

So you want a single, total and stacked bar for the responses?

There is something special with a stacked bar chart, you can't use it with just one dimension (e.g. ID) and one expression (e.g. count(Responses) ).

But you can leave out the dimension and use three expressions:

=count({<Response = {Dissatisfied}>} Item) / count(Item)

=count({<Response = {Satisfied}>} Item) / count(Item)

=count({<Response = {Neither}>} Item) / count(Item)

Then use a stacked bar style in style tab and check Show in Percent in Number tab.

Hope this helps,

Stefan

View solution in original post

3 Replies
Not applicable
Author

In the property of chart, tab Expression, check Relative

swuehl
Champion III
Champion III

So you want a single, total and stacked bar for the responses?

There is something special with a stacked bar chart, you can't use it with just one dimension (e.g. ID) and one expression (e.g. count(Responses) ).

But you can leave out the dimension and use three expressions:

=count({<Response = {Dissatisfied}>} Item) / count(Item)

=count({<Response = {Satisfied}>} Item) / count(Item)

=count({<Response = {Neither}>} Item) / count(Item)

Then use a stacked bar style in style tab and check Show in Percent in Number tab.

Hope this helps,

Stefan

Not applicable
Author

Thanks!!