Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

survey questions score and aggregation?

Hel\lo!

I had some help here for creating an inline load to map survey responses to numbers...

the next part however is throwing me off...

I have a set of survey responses, and each questions have a different number of responses..

I'm trying to now show the avg for each question (eg - question 1 has an avg of 4.54 based on the formula ((37*5)+(19*4)+(2*3)+(1*1))/(37+19+2+1)

but also I want to show the avg for all questions in each (section)

When I try to do something like AVG(AGGR ( COUNT (DISTINCT surveyID) question), I get 2.0

sample attached, hope someone can help!

18 Replies
Not applicable
Author

I see!

thanks for your help and answers!!

reddy-s
Master II
Master II

Always Welcome!

Not applicable
Author

Hello again,

OK, I realized that question #17 has different responses (e.g. the responses don't fall into SA,A, N, D, SD...they're numerical responses 1-4 on how much time spent preparing for course.

If I try to load an inline table for that with

mapping * LOAD Inline, all the questions now get 1-4 in addition to SA,A, N, D, SD...

is there a way of only showing SA,A, N, D, SD for questions 1-16, and have 17 use another set of responses?

many thanks for your help! I am starting too feel more comfortable in Qlik!

reddy-s
Master II
Master II

Hi Adrian,

Absolutely, by making use of the set analysis expression you can handle the way the calculations are performed. The key to this is the data model which is well built. Once that is ready , managing calculations on the front end becomes easy.

Hope this helps!

Thanks,

Sangram.

Not applicable
Author

hm OK, I'l give it a try, I have a rough idea where to begin..

something along the lines of sum({<QUESTIONS=,Code = -{17}>})/count({<QUESTIONS=,Code = -{17}>} would yield 1-16?

would I have to load another inline table to account for the other set of responses (1-4)?

apologies for being still confused!

reddy-s
Master II
Master II

Hi Adrain,

No problem at all. Yes you can do that for now. but inline table is a static table. I would suggest you to have all the dimension tables in the datasource instead of having numerous inline loads. (Just as a best practice)

Thanks,

Sangram

Not applicable
Author

Yes, I think having the dimensions in my table would be a better practice.

now..how would I still how all 17 questions on one bar chart? that is 1-16 with the SA,A,N,D,SD responses and #17 with the 1,2,3,4 response.

I think the quick hack would be to create 2 bar charts..one for Q1-16, and another for Q17..

many thanks!

reddy-s
Master II
Master II

Yes, you will be needing two different measures to achieve this.

Not applicable
Author

thanks for confirming I was on the right track!