Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Model For Survey Data

Hi Guys

I have to prepare a data model for survey data in which we have a excel file which contains all responses from user, question details and possible response values.

There are single response and multi response questions in survey

Data :

user_id
que_id
subque_id
response
u1q1
1
u1q210
u1q221
u2q1
2
u2q210
u2q221

Var_Info :

q_id
subque_id
desc
subdesc
q1
What is your Gender
q21What is the age of children2 years old or younger
q22What is the age of childrenBetween 3 and 5 years old

Var_Values :

q_id
subque_id
var_value
value_detail
q1
1Male
q1
2Female
q210Unchecked
q211Checked
q220Unchecked
q221Checked

Now I want to show some statistics in terms of bar graph.

Requirement1: For q1 I want to create a bar graph showing count of users based on gender (gender on x axis and count on y axis).

Requirement2: For q2 I want to create second graph showing count based on subdesc (subdesc on x axis and count of users having response                          value 1 for every subdesc).

What could be best approach to design this in QV. This is only sample data for two questions.

It would be very helpful to get expert suggestions on this scenario.

//Tribhuwan

3 Replies
narender123
Specialist
Specialist

see the attachment.

Thanks.

Narender

Not applicable
Author

Thanks for your response.

I want to make generic as I have list of questions and some questions have more than 10 sub questions.

Its not only Gender that I could write in load script.

//Tribhuwan

Not applicable
Author

You should start thinking about your datamodel. Based on the info you give I'd suggest you create a fact table for all the surveys and users IDs (I'd recommend also storing dates).

You can then create dimension tables for the users and the surveys. Each question will have it's row with the value filled in.