Answered

Performing multiple calculations

  • 22 July 2022
  • 4 replies
  • 119 views

I’m trying to build a calculator which involves combining answers to different questions to work out cost-savings for customers.

First, participants will be asked a multiple choice question, and can select as many options as they like. The number of options they choose will inform later calculations. Each option is weighted the same. For argument’s sake, I’ll describe this as “number of options selected = R0”.

I believe I would do this by setting a logic rule “If answer is A, add 1 to variable R0; If answer is B, add 1 to variable R0” and so on. If that is incorrect please someone let me know!

 

Then, questions 2 and 3 are numerical. I want to be able to multiply these together, and then multiply that by an integer to create a measure of their current costs. Let’s say “Q2 x Q3 x 365 = R1”.

This in turn would be used in a subsequent calculation, e.g. “((((R1/2)*30)/60)/60)=R2”, and eventually we end up with this: “(R2+R3+((R4-R5))*R6)*214=R8”, where those other Rs are created based on calculations between results.

Is there an easy way to build variables that are calculated using other variables? Or is this too advanced for Typeform? I’d originally built this in Outgrow but didn’t get on with their pricing model.

icon

Best answer by john.desborough 22 July 2022, 15:26

View original

4 replies

Userlevel 7
Badge +6

@telavox mkt - the short answer is yes it is possible in typeform’s logic rules

the longer answer is that it will require a bunch of what might seem like mind-numbing and tedious activities to create the logics rules the one time. but then it will work for you.. if you want it all done inside the logic rules. 

been there and done that.. 

 

des

Userlevel 7
Badge +5

Were you able to start building this logic @telavox mkt

@Gabi Amaral unfortunately not! Any suggestions on how to get started?

@john.desborough thank you for your response! It sounds like it could be quite complex - is it worth the effort or better to find a more specialised tool?

Userlevel 7
Badge +6

@telavox mkt - not complex… just that if it is your first time building out logic rules inside Typeform, you will probably find it a little tedious - writing the sequel code to do this is much more efficient but Typeform does not yet pull in the queries to do that

there are just a number of steps that have to done to get all the components of the calculation into the logic rules.. 

Reply