3 question groups, reset score to zero at the start of each group | Community
Skip to main content
Answered

3 question groups, reset score to zero at the start of each group


I have 3 groups of questions. Each group has either a yes or no answer. I’ve set up the following in the Score Quiz section: 

In group A if they select yes it counts as 3 points (8 questions, total possible 24)

In group B if they select yes it counts as 2 points (6 questions, total possible 12)

In group C if they select it counts as 1 point (3 questions, total possible 3 points). 

 

I want to calculate the percentage total for each group (and one overall score)

I found the very useful article by John here on how to do percentage scores 

I have set up the correct variable so I have a GroupA, GroupB and GroupC variable set as a number with the value 0. . 

The problem seems to be the @score is cumulative and somewhat unpredictable. 

If I put logic in for Group A on each question where I say if “question” =yes  then  @score + @GroupA , I get a result of 108 for all of Group A

 

Is there a way of resetting @score to zero before the logic on the first question on each group so I know it starts at 0. 

Also any idea why I get 108 in Group A, instead of the expected 24, when I choose yes for all questions.

I’ve tried to make this clear so apologies if it’s confusing! 

Best answer by john.desborough

@DawnWalton - create variables for each group to act as subtotals. only AFTER all the sections are completed should you add the subtotals to score. That way you should reduce the errors … to nil.. 

des

View original

5 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5300 replies
  • Answer
  • April 17, 2023

@DawnWalton - create variables for each group to act as subtotals. only AFTER all the sections are completed should you add the subtotals to score. That way you should reduce the errors … to nil.. 

des


  • Author
  • Explorer
  • 3 replies
  • April 17, 2023

Ahhh! Bloomin genius. Right that’s calculating it properly now. 

HOWEVER...@score is still cumulative. I want Group B and Group C to start at zero with @score. I thought I could set it up on the first question in the group to Always multiply @score by zero but I don’t seem to be able to select @score as a variable


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5300 replies
  • April 17, 2023

@DawnWalton - don’t use score to capture the details do something like this: 

group A

  • if q1 =yes add 3 to v_subtotal_A
  • if q2 = yes add 3 to v_subtotal_A

group B

  • if q11 =yes add 3 to v_subtotal_B
  • if q12 = yes add 3 to v_subtotal_B

 

group C

  • if q21 =yes add 3 to v_subtotal_C
  • if q22 = yes add 3 to v_subtotal_C

then do this

  • if v_subtotal_A is GTE 0 add v_subtotal_A to score
  • if v_subtotal_B is GTE 0 add v_subtotal_B to score
  • if v_subtotal_C is GTE 0 add v_subtotal_C to score

now you have score as the total of all three subtotals. 

you can also create a variable for the grand total (instead of using score) ie v_total

 

 


  • Author
  • Explorer
  • 3 replies
  • April 17, 2023

so does that mean under the quiz setting I don’t put any value on the questions - I just do it through logic?


  • Author
  • Explorer
  • 3 replies
  • April 17, 2023

Yeah baby! All working! @john.desborough  you are a life saver!


Reply