Welcome to the LimeSurvey Community Forum

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

Check quota inside the survey

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 1 day ago #270312 by brais24
Check quota inside the survey was created by brais24
Please help us help you and fill where relevant:
LimeSurvey version: 6.10.0
Own server or LimeSurvey Cloud: Own
Survey theme/template: Vanilla
==================
I there people, today i have another question, i have a survey with 4 quotas (A,B,C and D) and i need to see on the same survey os that quota, how many quotas you have from each type.

We need to do an specific % of each quota, for that we need the agents know at the begining of the survey how many surveys of each quota we have completed, how can i do this? we need to see this number live.

Thanks for the help.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 1 day ago #270316 by brais24
Replied by brais24 on topic Check quota inside the survey
I try to explain myself better, i have a question with 4 options, (A,B,C and D), i need some way to make able to the agents that will complete the survey, know at the moment they enter the survey how many surveys of each one are done and how many % of each one, is there any way to do it?

I think to try to make quotas witout limit, and show that quotas on the survey, but i dont know if i can do it, or if theres any way to see that info when you do the survey i be glad to hear it.

The number dont have to update live, i mean, it can be updated when you enter to the survey.

Greeting and thanks for the help.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 1 day ago #270317 by Joffm
Replied by Joffm on topic Check quota inside the survey
Hi,
so the agent starts the survey and on the first page there is displayed how many As, Bs, Cs, Ds have been completed so far?
You can do this with the function "statCountif" resp. "statCount" to calculate a percentage.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 8 hours ago #270324 by brais24
Replied by brais24 on topic Check quota inside the survey
Yeah, thats it, once i have the number, i supose i can calculate the %, can you give an example of how to do it one, que question is a dropdown list with 4 options, lets supose the question have the id P1, can you give me an example of how to do it.

Greetings and so many thanks for the help.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 8 hours ago #270325 by brais24
Replied by brais24 on topic Check quota inside the survey
I try to use the option {statCount("id")} on the quetion title, but says to me, "not defined variable" and appears like text 

Can you help me to fgure it out how to use this functions?

Thanks.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 7 hours ago #270326 by brais24
Replied by brais24 on topic Check quota inside the survey
Is it necesary to activate a plugin? I am trying to seearch for info and looks like that.

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 7 hours ago #270328 by brais24
Replied by brais24 on topic Check quota inside the survey
Ok, i activate the plugin and i be able to count the responses of each option with this codes on the question title:Respuestas de ámbito A: {statCountIf(P1.sgqa, "A1", 0)}Respuestas de ámbito B: {statCountIf(P1.sgqa, "A2", 0)}Respuestas de ámbito C: {statCountIf(P1.sgqa, "A3", 0)}Respuestas de ámbito D: {statCountIf(P1.sgqa, "A4", 0)}


 

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
3 weeks 7 hours ago #270329 by brais24
Replied by brais24 on topic Check quota inside the survey
But im still not knowing how to calculate the % of completes of each option, on the case of the image should be 50% in option A and B and 0% on the other 2 options, how can i get the %

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 weeks 5 hours ago #270334 by Joffm
Replied by Joffm on topic Check quota inside the survey
Hi,
Do you really want to count all surveys (completed or not)?

But im still not knowing how to calculate the % of completes of each option

How do you usually calculate percentages?
100*part/base

See these examples in the manual
  • count number of submitted response : {statCount("id")}
  • count number of responses (submitted or not) : {statCount("id", 0)}
  • number of responses where respondent stopped at page 1 : {statCountIf("lastpage", 1, 0)}
  • number of submitted responses with startlanguage "en" : {statCountIf("startlanguage", "en", 1)}
  • number not completed responses to this survey : {sum(statCount("id", 0),statCount("id")*-1)}
  • number of responses submitted in 2022 : {statCountIf("submitted", ">=2022-01-01")}
  • number of submitted responses with Y at a YesNo question title {statCountIf(YesNo.sgqa, "Y")}
  • number of responses (submitted or not) with Answer A1 at a Q01 question title {statCountIf(Q01.sgqa, "A1", 0)}
  • Validate unicity on a short text question (not submitted) {statCountIf(self.sgqa, self.NAOK, 0, 1)} (only when move next page)
 So you can do it like this:
Respuestas de ámbito A: {statCountIf(P1.sgqa, "A1", 0)}  = {100* statCountIf(P1.sgqa, "A1", 0)/statCount("id", 0)}%
Respuestas de ámbito B: {statCountIf(P1.sgqa, "A2", 0)}  = {100* statCountIf(P1.sgqa, "A2", 0)/statCount("id", 0)}%

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 weeks 5 days ago #270353 by brais24
Replied by brais24 on topic Check quota inside the survey
I just need to count the completed surveys, that what you give me works, but when i do an incomplete survey, that recalculates based on all the responses, how should work just with the completed surveys?

Please Log in to join the conversation.

  • brais24
  • brais24's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
2 weeks 5 days ago #270354 by brais24
Replied by brais24 on topic Check quota inside the survey
I be able to do it with this code on my final survey.
Just the question is QP7 and the response options AO01, AO02, etc

Respuestas de clasificación A: {statCountIf(QP7.sgqa, "AO01")} = {100 * statCountIf(QP7.sgqa, "AO01") / statCount("id")}%

Seems like work, thanks for the help.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose