Using multiple custom variables in a calculation | Community
Skip to main content
Question

Using multiple custom variables in a calculation

  • February 12, 2025
  • 4 replies
  • 46 views

I'm building a multi-score personality quiz that assesses different parts of the personality through a series of different sections (question groups). 

In the first question group, each answer a user chooses is set up to add “1” to a numerical custom variable. At the end of this question group, I want to calculate which of 8 numerical custom variables has the highest numerical value, in order to score which “type” they are—and then store the result in a custom text variable to use to display to the user with recall (@).

I understand how to set up custom variables and have many set up, and I have the proper if/then statements set up inside Branching Logic to store 1 point inside the proper variable based on their answers. Branching Logic seems like the only place to calculate using custom variables, but when I try to add rules that compare a custom variable to another custom variable, I'm blocked by the fact that I can only enter numerical values for any kind of compare or calculation… I can't calculate using more than one custom variable at a time.

Is it possible to do calculations using more than 1 custom variable?? This seems like a really important feature lol but maybe I'm just thinking and going about this wrong.

I guess I’m basically trying to figure out how to do spreadsheet formulas that recall specific cells to calculate something, though I can see there might be a better way to go about this scoring strategy? Or perhaps a better quiz making platform for what I’m trying to do? Or are people doing this using integrations with Google Sheets? Pleeeeeasseee help!!!!!

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14864 replies
  • February 12, 2025

@john.desborough is definitely your guy for this!


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5264 replies
  • February 13, 2025

@Liz ​@consult_dmc - i wish there was this ability to compare variables directly but unfortunately there is not

there are a number of ways to put in place the logic rules to  evaluate which is the highest score - but you have to think about what happens when you have ties for high score → are you going to use a tie-breaker question ?? there is a simple way to do it ie if there is any number subtotals tied for high score, just go to one question and ask them to ‘pick one’ to get a starting point. 

if your nurture funnel is about getting folks to start somewhere and engage with you based on getting feedback from  you, is simply having them choose from the entire list (simple tie breaker) going to work?

if you don’t want to take that tie-breaker approach, then you have to look at determining which categories are tied at high and pathing the user to the tie breaker question specifically for that tied-score combination. which can lead to having to evaluate A=B, A=C, A=D, ETC and A=B=C, A=B=D, ETC

there are a lot of tie breaker questions to insert into the logic here. 

but it can be done. 

there are a number of posts in the Community where i have outlined approaches for this type of evaluation and i have done up some sample cheat sheets for 5-category scenarios (variable vs variable) and with a simple tie-breaker solution. You could use those as the basis for extrapolation if you wanted to give it a shot. 

unfortunately, there isn’t even an easy way to take the results in a row in a Google Sheet and sort them into a descending order - you have to do a transform on the row range to put it in to a column and then sort and then transform the result set back into the row in another set of columns to maintain the descending value. but then you still have to deal with how do you rationalize tied values. 

 

just sayin’ that there isn’t a perfect solution 

 

des


  • Author
  • Explorer
  • 1 reply
  • February 20, 2025

Thank you so much. Very helpful. I really appreciate knowing where the limits are, because it can be hard to tell from just piecing together outdated help articles and videos if I’m on the right track!


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14864 replies
  • February 27, 2025

Glad to hear ​@john.desborough could help! He’s basically an advanced help center for Typeform. 😂

If there’s anything else we can help with, please let us know!


Reply