Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to do an equation (average) with a variable number of total responses matrix

  • Episteme Investigación e Intervención Social
  • Episteme Investigación e Intervención Social's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 months 2 days ago #246076 by Episteme Investigación e Intervención Social
How to do an equation (average) with a variable number of total responses matrix was created by Episteme Investigación e Intervención Social
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================

Hi,
I am trying to make an equation to qualify the scores of a scale but I have a question. The scale reads: Score from 1 = "No risk" to 4 "Great risk" and consider the answer "Hard to say / I don't know" as not answered. Therefore, I need the number of questions with which the average is made to be variable depending on the number of questions answered in a matrix. For example, if the respondent only answers 4 questions out of 6 (not responding Q1_2 and Q1_4) it will be like this:{(sum(Q1_1.NAOK, Q1_3.NAOK, Q1_5.NAOK, Q1_6.NAOK)) / 4)} 
instead of {(sum(Q1_1.NAOK, Q1_2.NAOK, Q1_3.NAOK, Q1_4.NAOK, Q1_5.NAOK, Q1_6.NAOK)) / 6)} if all questions are responded.

Can this be made?

I attached the survey .LSS in English with the equation and values.
 

Attachment not found



Thank you! 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 months 2 days ago - 8 months 2 days ago #246078 by Joffm
Yes, of course.
You have to divide by the number of items that are not "no responde" = 0
To count these items you may use the function countifop(">","0",that.Q1)

 
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 8 months 2 days ago by Joffm.

Please Log in to join the conversation.

  • Episteme Investigación e Intervención Social
  • Episteme Investigación e Intervención Social's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 months 2 days ago #246080 by Episteme Investigación e Intervención Social
Replied by Episteme Investigación e Intervención Social on topic How to do an equation (average) with a variable number of total responses matrix
It works perfectly! Thank you very much for your quick response.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose