0

I have a form with Yes or No questions and would like to assign a value to each of the answers, example: yes=-1/No=1. Then I would like to have a total calculation from all of the yes or no answers at the bottom of the form. This is what it looks like in excel. I already have the form typed up in Cognito with each of the yes and no sections. All I need is a way to do the calculation.

enter image description here

1 Answer 1

1

I'm a developer for Cognito Forms.

Yes, you can set this up using a Calculation field set to the type of 'Number'.

You will need to set up an 'If Then' option for each of your questions to assign a '1' if "Yes" is selected otherwise a '-1' will be assigned. I have set up several questions as an example.

if DoYouLiveOutsideOfMarshallCounty = "Yes" then 1 else -1
if DoYouHaveAnySourcesOfIncome = "Yes" then 1 else -1
if DoYouHaveAnyOtherPeopleLivingInYourHome = "Yes" then 1 else -1

You will then need to contain each 'If Then' option inside of parentheses ( ) so that you can add them together, into a grand total.

=(if DoYouLiveOutsideOfMarshallCounty = "Yes" then 1 else -1) + (if DoYouHaveAnySourcesOfIncome = "Yes" then 1 else -1) + (if DoYouHaveAnyOtherPeopleLivingInYourHome = "Yes" then 1 else -1)

I have included a link to my demo template, that you can copy into your Organization. This will let you see both the build page, and the preview page to see Calculation in action.

1
  • Thank you for your help i will work on this today and let you know how it came out! Sep 15, 2016 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.