Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mhassinger
Creator
Creator

Chart dimension - same 4 values that appear in multiple fact table columns

I have a data source that is a survey. Each question is a column. There are a series of questions that ask the respondent to rate a different factor 1-4. What I'm trying to get is a chart with one dimension - the values 1-4, and multiple expressions for each question of these types of questions.

I'm not sure what the best approach is.

4 Replies
pover
Luminary Alumni
Luminary Alumni

You can surely make the factor a dimension so that you see the values of 1-4, but the big question is how you want to group the questions. Do you want to count how many question fall into each value, or count(question)? Do you want to see all the questions in each value, or concat(question,', ')? What do you want to see?

A common graph of survey data that I once did includes the questions as a dimension and a expression that determined the average value of each question, or avg(factor).

Regards.

mhassinger
Creator
Creator
Author

I am looking for 4 groups along the bottom axis, 1-4.

Above each number, I want a bar for each question. Each bar should represent the count of records that have answer. For example, the records looked like:

Question 1 Question 2
1 2
1 3
2 4
1 1

For the first value of the dimension, 1, there should be two bars - the question one bar should have a value of 3, and the question 2 bar should have a value of 1.

pover
Luminary Alumni
Luminary Alumni

Here's an example of how to do it. Just make the dimension Question and Factor and the expression count(Question).

You might have to a crosstable in the script to make the table necessary to do this. See the inline table in the example.

Regards.

mhassinger
Creator
Creator
Author

I was hoping I wouldn't have to mess with the data structure to accomplish this, but it appears I do based on your example. I don't have

Question 1, 1
Question 1, 2
etc.

as my row values.

I have

1, 1
1, 2

where the two columns are question 1 and 2.