Answered

Are "allocation" questions possible?

  • 1 September 2021
  • 12 replies
  • 423 views

I would like to create a question which asks the respondent to allocate 100 points across three different choices. e.g. they could choose Choice A - 70, Choice B - 20, Choice C - 10.

The system would need to ensure that the responses total 100, and raise an error if they don't. 

 

Is this possible, and if not, what alternatives can you recommend?

icon

Best answer by john.desborough 1 September 2021, 21:48

View original

12 replies

Userlevel 7
Badge +5

Hi @rg99 Happy Wednesday! Overall, this feature isn’t available in Typeform automatically, so you would need to use a combination of the calculator and logic jumps to set this up. 

@john.desborough may have an example of this, if I’m remembering correctly!

Userlevel 7
Badge +6

@rg99 @Liz - if you want to ask this in three questions you can do it fairly simply starting with this sort of structure:

[note it would awesome to have logic available from a matrix question so that we could test out and validate the selections from a simple matrix… but… ]

  • welcome screen or statement - we are going to ask you to allocate 100 points across 3 categories and they have to total 
  • q1 - how many point out of 100 will you add to this option? a number question 
    • add response to a variable called v_total
    • subtract response from variable called v_left, which has initial/default value of 100
  • q2 - you allocated @recall answer 1 points  in the first option. you now have @recall v_left points left to allocate to the next this option and the next one. how many points will you allocate to option 2?
    • if q2 answer less than or equal to v_left, add response to variable v_total 
    • if q2 answer GT v_left jumpto to “bad answer page q2 and then recycle the person back to q2 to answer again
    • if q2 answer less than or = v_left subtract q2 answer from v_left
  • q3 - you have allocated a total of @recall v_total points out of 100 to the first two options, you have @recall v_left to allocate to option 3 
    • you can do this automatically so that there is no margin for error on under-allocating 
    • OR you can do the evaluation of the amount and if they put in too much, send them to a bad answer page, if too little you can send them back to confirm the number by entering in the points available in q3
  • q4 - a yes no question that says something like - are you happy with this allocation of points 
    • option 1 @ recall points
    • option 2 @recall points
    • option 3 @recall points
    •  
    • if yes go to ending, if no, reset variables to default values and go back to q1 to start again. 

not pretty but it works

des

Userlevel 7
Badge +5

Thank you, @john.desborough !!

Thank you for the responses. Yes, it would definitely be great to be able to do this within a matrix so all options are visible on screen at the same time. I will try out John's recommendation in the interim.

Userlevel 7
Badge +5

Let us know how @john.desborough ‘s suggestion goes, @rg99 !

hi there! I am trying to replicate this for 5 questions but I don’t manage to a) set up the v_total and b) the recall option. could you help me with this? @john.desborough 

Userlevel 7
Badge +5

Hi @jasmiin Could you send over screenshots of what you currently have setup and what isn’t working? Thanks!!

So this is the question: 

We are going to ask you to allocate 100% across 5 different value adds that you have received form us after the investment. Please make sure they add up! → then you have option 1, 2, 3, 4, 5

 

I then tired to define the variables. But here already, I wasn’t sure how to define the v_total as this is the sum of the different answers.

 

Then I started with Option 1, so that the answer a) adds to v_total and then v_total is subtracted from v_left. 

 

 

How do I now continue for Option 2, 3, 4, and 5 so that ultimately all add up to 100?

 

Thanks!

 

any thoughts on this @Liz ? :)

Userlevel 7
Badge +5

Hi @jasmiin Thanks for sending this over! I’m seeing the first step @john.desborough mentioned set up, but not the remainders. For example, you should be able to set up this:

“if q2 answer less than or equal to v_left, add response to variable v_total “

the same way you have the one shown in the screenshot above. Let us know if you run into any trouble setting up these, and we can take a further look at this!

Userlevel 7
Badge +6

@jasmiin @Liz - i would also recommend NOT using the ALWAYS option in the logic.. that seems to be triggered first on the page regardless of the other logic that is preceding it.. this was something that was outlined in a post about 6 months ago.. i don’t know if that has been changed.. 

 

des

hi - thanks but don’t get 2 things:

 

how can I add the remainders? I can not add a variable after “is lower or equal to” but just a number. 

 

how do I set up a bad answer page? 

 

thanks for a short feedback!!

Reply