Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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!

Tags (1)
1 Solution

Accepted Solutions
reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

So here is what you need:

Capture.PNG

I have answered all your questions in the Dashboard. I changed the code in the script and the expressions I have used are simple ones.

Check the QVF. Let me know if you need any explanation anywhere.

Thanks,

Sangram.

18 Replies
reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

Can you provide the csv file as well? As any changes to the script can't be done as of now.

Thanks and Regards,

Sangram Reddy.

Not applicable

Re: survey questions score and aggregation?

added now

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Thank you for the file

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

So here is what you need:

Capture.PNG

I have answered all your questions in the Dashboard. I changed the code in the script and the expressions I have used are simple ones.

Check the QVF. Let me know if you need any explanation anywhere.

Thanks,

Sangram.

Not applicable

Re: survey questions score and aggregation?

thank you! that's exactly what I'm trying to do! I know now a lot more about inline!

What would I have to do to show the mean for a particular question only?

eg. a textbox that shows the mean for question#1?

many thanks!

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

I am glad it helped!

if you would like to restrict calculations, you need to make use of Set analysis.

Thanks,

Sangram

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

I will alter the qvf and post it again so that you will have no doubt about it.

Will get back soon.

Thanks,

Sangram.

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Hi Adrian,

Here is what you are look for. So I have added a set analysis expresion to calculate the avg for only one question.

2016-01-24 03_25_52-Qlik Sense Desktop.png

So Here I am calculating for only Question 15 which has a "QCode" value 1. Check the QVF for more insight.

Thanks,

Sangram.

reddys310
Honored Contributor II

Re: survey questions score and aggregation?

Please find the QVF attached.