Answered

I need advanced calculation.

  • 30 November 2023
  • 3 replies
  • 82 views

Hello!

I need to make a price calculator with these prerequisites:

  1. A number of choices will be selected from a Drop Down menu (max 5), lets named it “SELECT SERVICE”
  2. Price will be set on each choice while building
  3. Calculation: 1st most expensive choice will have no discount. 2nd most expensive choice will have 20% discount. 3rd, 4th and 5th will have 50% discount. Sum of the above calculations will be displayed on statement field. 
  4. If YES selected on another YES/NO field then make 10% discount on 1st most expensive choice on “SELECT SERVICE” 

I don’t know if this calculation can be done because i can’t find a way to set most expensive choices.

 

Thanks! 

icon

Best answer by john.desborough 1 December 2023, 19:58

View original

3 replies

Userlevel 7
Badge +5

Hi @Dimitris how’s it going?

This might be a bit complicated for the typeform calculator, but I’m just double checking with the support team to see if there is a way to do it! 

Userlevel 7
Badge +6

@Dimitris @Grace - at the moment, the logic manipulations to determine the Highest scoring element are reasonably easy to calculate ie out of the 5 which is the highest but to determine the ordinal ranking of the others takes you into a massive loop of logic that is extremely complicated and not something that ‘native typeform logic’ can easily handle (if at all in my opinion though i have tried to make this work many times over the past two years and have given up after about 350 logic rules for ranking 5) 

and if there is a tie for high score, what do you do then - go to a tie breaker? or are all the services priced uniquely ie none at the same value?

connecting to a google sheet or some other backend may be the best way to write the data and then run a macro/routine over the data record to determine the ranking and then pass them back via the API into a second form that takes the 5 ordered variables and applies the discount using the logic rules inside your typeform. 

 

@mathio did something like this in a post to look up ‘price of a phone’ in this post - check out his example at the tail end of the thread… it is likely that you could so something like that in this case. 

Userlevel 7
Badge +5

Thanks so much @john.desborough, it’s certainly a complicated set up when prices are dynamic! @Dimitris let us know if you manage to get something working or have any follow up questions 😊

Reply