Score Variable to Specific Ending

Userlevel 1

Hi there, 

I’m trying to create a Survey Evaluation that requires the Advanced logic using the Branching and Calculations. 

At the end, I’d like the score variable to lead to a specific Ending, in which the Ending will have the users score and interpretation of the score.  For example, a score of 20 from our survey would lead to Ending A, which will tell the user what that score means.

Is this possible? I see that it’s possible under simple logic, but I can’t figure out how to do it with Advanced logic function.




Best answer by vickioneill 16 March 2021, 10:33

View original

12 replies

Userlevel 7
Badge +6

@ctngo3 - this is from a user as well

I do this on several of my typeforms: where i have a series of question groups, each with their own set of questions and ‘score ratings’ for results, and an overall score value that routes users to one of 4 specific ending paths, complete with summary details, typical things you can do to improve in your level and climb higher and some custom images/graphs 

i did the following in the advanced logic area with variables and branching/calculation

  • set subtotal variables for each question group ie q1_group_score, q2_group_score etc
  • i added the score from the questions within a group to the appropriate group_score variable 
    • with a Likert like question, you can simply add the response value to the variable ie @recall_q1a to the subgroup (it is already a number) 
    • if you use a multiple choice like severley disagree, disagree, moderately agree etc, you would need to add logic rules to the question to tell it to add a specific value to the variable ie if Severely disagree then add 1 to q1_group_score.
    • add q1 and q1 and q3 group scores, etc to score (the total variable)
  • then i put in a statement page that summarizes the responses and interim score as necessary and let them know that we are going to display the next page based on their score
    • if score is greater than 32 jump to ending A, if score is greater than 20 and less than or equal to 32 then jump to ending B, etc. 

that seems to be able to address what you are looking to achieve, at least i hope it moves the needle a little. 


there are several threads within this community that cover the topic. 





Userlevel 7
Badge +5

@john.desborough I’m going to refer to your response in the future when I’m struggling. This is a very detailed description of the logic needed. Thank you for providing that level of detail!

I just shared these screenshots in another post for a visual reference, @ctngo3 . I hope it’s also helpful. 


Userlevel 1

Thank you everyone! Very much appreciated!

Hey @john.desborough - you sir are an absolute Typeform legend!  Thank you so much for all the posts you do in this community, it’s helped me so much.


I am struggling to find an answer to my current predicament: I have a bunch of variables with their own ‘scores’ in, and at the end of my quiz I want these variables to link to a certain ending - the issue I am having is using these variables to interact with Typeform’s native ‘@score’ variable which will determine which ending someone is redirected to.


Here is a screenshot of my issue:


In my head, I would add my variable to “score” and it would dictate what ending I send the user to.  If you have any ideas that would be awesome!

Basically I can’t select @score in the right hand side of an if statement!

Userlevel 7
Badge +6

@coysammy - so the issue you are seeking to resolve sounds like this: 

  •  you have a set of variables and you want to send the user to the ending associated with the highest one? 
    • if this is the case, you don’t need to add them to score, you need to evaluate things like
      • if immunity greater than beauty AND  immunity greater than gut etc…. if all of this is true then send the user to the ‘immunity ending page’ 
      • if beauty is greater than immunity and beauty is greater than gut etc  … if all true then send the user to the beauty ending page.. 
      • do for all the cases 
      • this will give you the first pass on the ‘single unique highest score’ that routes folks to the correct page..
      • but what happens if you know that won’t always be the case… you need to evaluate ‘how many times is variable X higher than the others” then take the highest number count and determine the path based on that
        • that is where you need to start using another set of variables to do the comparison (or at least this is the method that i use) - i create a set of variables to use for the calculations something like this: v_cat1_vs_cat2 and the logic rules would be something like this 
          • if cat1 (ie gut) is gt 0 add cat1 to v_cat1_vs_cat2
          • if cat2 (ie immunity) is gt 0 subtract cat2 from v_cat1_vs_cat2
          • then if the value of the “..vs..” gt 0 add 1 to the cat1_is_biggest variable
          • if the value of the vs variable is lt 0 add 1 to the cat2_is_biggest variable
        • repeat for all combinations.. 
        • then you can determine which has the biggest count - since it is not unique ie in a case of 6 categories you would only get 1 result of 5 gt’s (that is covered by the unique option outlined way up) - here you are looking to see if there is a unique 4-count (of higher than other variables - there could be ties.. 

it can be a long drawn out process to determine which one ending you are going to send them to, depending on the number of categories you are looking at. 


Here’s a little example form that walks you through a 5-category example .. it will show you some of the output of the calculations in the walk through 

is this what you are trying to do?? 



Hey @john.desborough - thank you very much for taking the time to reply!

I am afraid it’s not quite as simple as this.  Within my quiz, there are a different # of questions for each variable (e.g. immunity has 12 possible points throughout the quiz, whereas gut only has 5 possible answers).

So I was hoping to say, if gut >=4 (with limited questions, the user has stated that gut is always important), then make “@score” = 2 (and set the score based ending to take the user to ending for score = 2).

My issue is that for some reason I cannot select @score from the right hand side of the if logic in typeform and I am not sure why!

Userlevel 7
Badge +6

@coysammy - suggest NOT using score but creating another variable, call it v_score, and try using that as the subtotal that drives the user to the ending and not score.. 


if that doesn’t work, raise a help ticket with the support desk


Hi @john.desborough not sure if you can help, but the logic I am trying to create is:

  • Answers to questions will add a number to a custom variable, e.g variable_0, variable_1 e.t.c….
  • For the final screen, determine which variable is the highest and display an end screen based on that.

I saw that you answered how to do this above by saying:

if immunity greater than beauty AND  immunity greater than gut etc…. if all of this is true then send the user to the ‘immunity ending page’

However, I do not have the ability in the logic to say: if variable_0>variable_1 then ……

It only lets me do: if variable_0>number then…….

In other words it only lets me compare a variable against a number, not another variable.


Any ideas?

This screenshot relates to my post above.


Userlevel 7
Badge +6

@timphillips77 - try this sort:

  • if v_1 greater than 0 then add v_1 to v_1_minus_v2
  • if v_2 greater than 0 then subtract v_2 from v_minus_v2
  • if v_1_minus_2 is GT 0 then go to …
  • if v_1 subtract v_2 is greater than 0  then go to .. (same result as above)
  • if v_1 subtract v_2 is less than 0 then go ….
  • if in either case the result = 0 you have a tie

small sample


Hi @john.desborough, thank you for your answer. I am trying to apply it without success. I would like to explain my situation. 

I have 18 answers and 6 variables. Each variable is composed by 3 answers, and each answer have a possible value from 1 to 5. The highest variable will lead to a different ending.   

Could you share an image of one of the logics on typeform as a reference for this situation? 
Thank you