Help multiplying and summing two answers | Community
Skip to main content
Answered

Help multiplying and summing two answers


This seems like a really simple thing but I'm struggling to figure it out using the tools available. I'm making a simple financial calculator of sorts. I basically want to ask two questions, then multiply them by an integer, sum the total, and present that total on the end in a statement question. For example:
Q1: How many babies do you have? (num; suppose answer 1)
Q2: How many kids do you have? (num; suppose answer 3)

@REFUND_AMOUNT == (Q1 * 200 + Q2 * 100) == $500 
Output on the ending screen: "You will get a @REFUND_AMOUNT / $500 tax credit this year!"

I'm building this to help consumers understand the new Child Tax Credit that was just passed in the United States. Thank you!

Best answer by john.desborough

@tinytorso - welcome to the community from a fellow user. 

If you are using the new builder:

  • you could create variables for baby_refund, kid_refund and total_refund
  • at the end of question 1, add the number of babies to the baby_refund variable in one logic rule then a second logic rule to multiple baby_refund x 200 
    • that will give you the value for the baby refund
  • do the same for the kid refund
  • then add the baby_refund and kid_refund variables together to get total_refund. 

see this simple sample

and here are some of the logic pics

 

 

 

hope that helps.. 

 

des

View original

2 replies

john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5328 replies
  • Answer
  • April 18, 2021

@tinytorso - welcome to the community from a fellow user. 

If you are using the new builder:

  • you could create variables for baby_refund, kid_refund and total_refund
  • at the end of question 1, add the number of babies to the baby_refund variable in one logic rule then a second logic rule to multiple baby_refund x 200 
    • that will give you the value for the baby refund
  • do the same for the kid refund
  • then add the baby_refund and kid_refund variables together to get total_refund. 

see this simple sample

and here are some of the logic pics

 

 

 

hope that helps.. 

 

des


  • Author
  • Explorer
  • 1 reply
  • April 20, 2021

Perfect, thanks a ton @john.desborough. Got it working. 


Reply