Answered

SOS: showing unique ending based on lowest variable score

  • 15 March 2024
  • 6 replies
  • 44 views

Hello,

I’m using typeform for a wellness assessment with 18 questions covering 6 different areas. I’m using a 1-5 opinion scale and some questions are reverse-scored. The max score for each of the 6 areas is 15.

I created 6 variables corresponding to each area, and used branching and calculations to update each variable according to the answers. I have a temporary page that displays the 6 scores and I got this part right.

 

I need help with the final step: showing a unique ending based on the lowest score from the 6 variables. This ending has recommendations that the user can then take into my product. If there’s a tie, I can show one screen with universal recommendations.

I came across this post that explains how to do it but I’m quite lost on the logic setup. I can’t compare variables as I’m forced to enter a number rather than another variable - see below attempt to do so:

Please help!

icon

Best answer by john.desborough 15 March 2024, 18:04

View original

6 replies

Userlevel 7
Badge +5

Tagging @john.desborough to see if he has a cheat sheet on this!

Userlevel 7
Badge +6

@ayadihealth - i saw your other post as well about not understanding how to do the logic.. so this response might cover both: 

you are correct in that you can’t compare two variables directly - i wish we could and have raised it often with the product team .. that being said, there are a number of ways to use the logic to determine high or low scores - but i did create a ‘cheat sheet’  for 5 categories for high score (in fact two of them) that are available here.

​these are NOT for the low-score logic you are seeking but you could invert the logic flow to examine for the lowest score.. 

you have to add in the code for the 6th category but you should be able to follow the method based on examining how the logic works for 5. 

@Liz - hope that helps

 

des

Thanks @john.desborough I purchased the cheat sheet and I’m going through it now. I will let you know if I need more help..

Hello @john.desborough thank you for the elaborate cheat sheet

referring to this one, I’m a little lost from the bottom of page 38 onward, specifically this part:

What is the rationale behind the cat# and the condition that it equals 4? As I’m working with 6 variables, I’m trying to make sure I reverse engineer this properly.

 

Also on page 46/51, there’s a ‘0’ there - it looks odd as nowhere else you’ve used 0, Is that supposed to be 2?

Lastly, when you say I can inverse the logic to fit my use case, which parameters am I inverting exactly? I’m a bit over my head and could use your help. 

Thanks!

Userlevel 7
Badge +6

@ayadihealth = thanks for catching that typo, it should be a 2.. i will get it updated and a correct version posted (dm your email address and i will send updated file)

 

re the first part of your questioon:

 specifically this part:

What is the rationale behind the cat# and the condition that it equals 4? As I’m working with 6 variables, I’m trying to make sure I reverse engineer this properly

 

there is a set of logic rules that examines the number of times that category 1 is higher than the other category scores - with 5 categories, the max would 4 (higher than cat2, cat3, ca4 and cat5) … that ‘number’ of higher-thans is recorded in the cat1_gt_total in the example above. in this case, of 5 categories, any score of in catX_gt_total that would be = 4 would be a unique high score for category x. 

for you, with 6 categories, you would have to add a set of logic for the evaluation of cat1 vs cat6, cat2 vs cat6, etc. and then the max for the catX_gt_total would be 5 for a unique win. 

Thanks @john.desborough, I followed the cheatsheet and attempted to inverse the logic - I’m getting the wrong ending (not the lowest result as intended).

 

Can you audit my logic?

Reply