Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

100% Stacked Bar Chart with Grouped Dimensions

Hi All,

I am very new to Qlik Sense and is now trying to produce a 100% stacked bar chart for a survey analysis.

By searching information from the internet, I am able to produce a 100% stacked bar chart with 1 dimension 'Classification' over dimension 'Q1 Response' (see below):

Qlik 1.png

The expression I used in my measure is:

Count([Q1 Response]) / Count(TOTAL <Classification> [Q1 Response])


Now, I want to do dimension grouping, for the Classification used as dimensions, I want to group 'IPOS' with 'NB - IPOS' and give a new name as 'iPOS'; then group 'MCV' with 'PRC' and name this group as 'MCV', for the rest, name the remaining group as 'Paper'. I would like to show the new group name on left hand side (y-axis) while allowing the user to drill down to see the original grouping if they like.


I tried to create new variable by following expression:

=if(match(Classification,'NB - IPOS','IPOS'),'iPOS',if(match(Classification,'MCV','PRC'),'MCV','Paper'))

and is able to use this new dimension to group the data, but the chart is no longer a 100% stacked bar chart even though I set it to be stacked.

Can any one help me out here? What should be the expression for the measures or dimension?? Thanks in advance!!!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

The easiest and imho best way is to create a new field in the load script for the groups. Then you can use that new group field as dimension and in your expression for the TOTAL qualifier.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

The easiest and imho best way is to create a new field in the load script for the groups. Then you can use that new group field as dimension and in your expression for the TOTAL qualifier.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Many thanks!! I have resolved the problem by creating new field!!!

domm
Contributor III
Contributor III

Hi, how did you created the new field in the load script for the groups?