Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to chart customer satisfaction survey results. The results are available in tabular format like this:
custid | q1 | q2 | q3 |
---|---|---|---|
1 | Fair | Good | Very good |
2 | Poor | Very good | Fair |
where q1..q3 are the questions asked. The possible values for q1..q3 are Poor, Fair, Good, Very Good. I want to create a chart with 3 100% stacked bars (one for each question) showing the relative percentage of Poor, Fair, Good, Very Good.
I suspect I may have to rearrange my data in a different structure to accomplish this, but I am wondering is there a smarter way.
If I rearrange the data like this
custid | question | answer |
---|---|---|
1 | q1 | Fair |
1 | q2 | Good |
1 | q3 | Very good |
2 | q1 | Poor |
2 | q2 | Very good |
2 | q3 | Fair |
then I can set my first dimension to 'question' and my second dimension to 'answer' and the measure is COUNT(custid).
Does anyone have suggestions as to whether this is possible in Qlik Sense without rearranging the data first? Thanks.
You should be able to do this while loading your data in the script using
CROSSTABLE (question, answer)
LOAD custid, q1, q2,q3
FROM ....;
I think swuehl has you on the right track for loading the data. You may want to reconsider the stacked bar chart as your visualization. A Pivot grid can sometimes be a more insightful analysis of survey responses. An qvw showing both the grid an stacked bar approaches is attached.
Thanks very much swuehl and rob. Makes sense.
Thanks for attachment too but it might be a couple of days before i get to this.