Set the calculation widget to exclude N/A value

  • FGAPM
    Asked on April 14, 2020 at 5:30 PM

    Hello

    I have build a form with questions. Each question has an answer 10/8/4/1 and N/A, in the last page of my form, I need to do a calculation of result base on questions. For example, question type Process Maturity: formula is (question 1 + question 2+question 3+...Question 7)/70%


    The calculation works fine, until I found if there is question with answer N/A, than the calculation is wrong. Basically, the formula calculate the total score/max, but the max is not changed. causing the result incorrect.


    Pls help and advise if there is any better way.

    Thansk

    Ryan

    Jotform Thread 2261167 Screenshot
  • David JotForm Support Manager
    Replied on April 14, 2020 at 7:26 PM

    Hi, please try assigning zero to the N/A option, example:

    1586906736calculationvalue Screenshot 10

    Let us know if you need more help.

  • FGAPM
    Replied on April 14, 2020 at 8:01 PM

    Hi

    Thank you very much. This does not solve the issue. Because:

    1. The total cumulated score will be correct 

    2. The maximum total possible score for the cumulated question will not change, causing the percentage calculation is wrong 

    3. For example, I have 7 questions, each with selection of 10/8/4/1 and NA, if I assign the value 0 to N/A. I will be able to get the total score correct. For example: question 1-7 got answer of 10,10,10,10,10,10 and N/A, which means total of score of 60, then I need to calculate the result in percentage: 60/60=100%. However, the widget Formular is not dynamic, I will still be calculating with (Q1+Q2+Q3+Q4+Q5+Q5+Q6+Q7)/70=60/70=85.7%, this is not correct. So my question is how can I set the formula to have the maximum possible score dynamic. Idealy, when the N/A is selected, the question is not add to calculate for the score and maximum score. 

    pls advice. May be create another field with maximum score, but I also need to be able to exclude the value for N/A question 


    pls help 

    Thx

    Ryan 

  • Mike_G JotForm Support
    Replied on April 14, 2020 at 9:12 PM

    Please allow me some time to work on a solution that would meet your requirements.

    Once I have the solution, I'll update you in this thread right away.

  • FGAPM
    Replied on April 14, 2020 at 9:26 PM

    Thank you very much. I look forward to it.

  • FGAPM
    Replied on April 15, 2020 at 10:04 AM

    when can I expect an expect please?

  • John Support Team Lead
    Replied on April 15, 2020 at 11:16 AM

    Hello @FGAPM - I believe this can be achieved by counting how many questions have an N/A answer first. Then based on that count, we can determine the divisor to use.

    First, we need to count how many questions were answered "N/A". How do we do that?

    You can add a NUMBER field after each questions. We will assign a value of 1 to if the user chooses N/A from the options of the previous question. Here's an example:

    Set the calculation widget to exclude N/A value Image 10

    Let's add the condition. Here's an example:

    15869634392261167 2 Screenshot 21

    As you can see, we have assigned a value of 1 to Is NA_1? if the user chooses N/A from question 1.

    You need to create conditions for each question.

    Then at the bottom of the form, we will add a FORM CALCULATION widget to determine the total count of questions that were answered N/A. 

    15869637202261167 3 Screenshot 32

    So technically, the MAX value should be 50 if the user never chooses NA from the 5 questions. And if the user chooses an N/A option, we will count them, multiply it to 10 then subtract it to the supposed MAX value. The result will be our new DIVISOR.

    Example Scenario: If the user answers 10 for the first three questions and NA for the last two, the MAX value should only be 30 right? I have tested this on my end and it works as intended.

    I have implemented it in a cloned form. Here's a link that you can try:

    https://form.jotform.com/201054174941954 

    I only used the first 5 questions for demo purposes.

  • FGAPM
    Replied on April 15, 2020 at 4:27 PM

    Hello support team,

    Thank you very much. I still have a few questions:

    1. The method is quite complicate, and I have to add on 1 additional field per question to collect N/A. This makes my form not very user friendly. 

    2. Some of my questions is weighted, I assigned a calculated value for that particular question. for example, a question with answer 10, it will be calculated as 20 or 30, or 100 when doing final question. The method you have suggested above does not solve this issue, because count of N/A does fix this issue. 

    Can you please suggest an easier method? What would happen if I skip the question instead of using N/A? 

    By the way, is this the only method to get support from jotform? Any chat method or phone? I think my issue is complicated, and using this method is very time consuming to fix it. 

    Pls help. 

    Thanks

    Ryan

  • John Support Team Lead
    Replied on April 15, 2020 at 6:06 PM

    1. The method is quite complicate, and I have to add on 1 additional field per question to collect N/A. This makes my form not very user friendly. 

    You can set the added counter fields to hidden so it won't be shown when the user is filling out the form. 

    15869876132261167 4 Screenshot 10

    2. Some of my questions is weighted, I assigned a calculated value for that particular question. for example, a question with answer 10, it will be calculated as 20 or 30, or 100 when doing final question.

    No, it won't. It will still be calculated as-is. Note that the method only determines the MAX VALUE (divisor) to be used. So instead of this:

    15869879762261167 5 Screenshot 21

    It should look like this one, making the values dynamic:

    15869881152261167 6 Screenshot 32

    The method you have suggested above does not solve this issue, because count of N/A does fix this issue. 

    My understanding is that you need to make the MAX VALUE to be dynamic, setting aside the questions with NA answers in it. Is that correct? If so, I believe it does resolve the issue as we are able to eliminate those NA answers.

    What would happen if I skip the question instead of using N/A? 

    We can add another criteria to the conditions we created so empty questions will not count into the MAX VALUES as well.

    Here's an example:

    15869882742261167 7 Screenshot 43

    Hope this clarifies. 

    Let me know if there's something I have missed.

    Also, we don't offer phone support at the moment, unfortunately. This forum is our primary method of support. So if you have questions/concerns, please feel free to write it down and we'll be more than happy to answer them here.



  • FGAPM
    Replied on April 16, 2020 at 2:28 PM

    Hello 

    Thank you very much.

    Here is the issue:

    2. Some of my questions is weighted, I assigned a calculated value for that particular question. for example, a question with answer 10, it will be calculated as 20 or 30, or 100 when doing final question.

    No, it won't. It will still be calculated as-is. Note that the method only determines the MAX VALUE (divisor) to be used. So instead of this:

    15869879762261167 5 Screenshot 10

    It should look like this one, making the values dynamic:

    15869881152261167 6 Screenshot 21

    The method you have suggested above does not solve this issue, because count of N/A does fix this issue. 

    My understanding is that you need to make the MAX VALUE to be dynamic, setting aside the questions with NA answers in it. Is that correct? If so, I believe it does resolve the issue as we are able to eliminate those NA answers.


    Yes, I need the Max Value to be dynamic. The problem is if Some of my questions is weighted, I assigned a calculated value for that particular question. for example, a question with answer 10, it will be calculated as 20 or 30, or 100 when doing final question.

    No, it won't. It will still be calculated as-is. Note that the method only determines the MAX VALUE (divisor) to be used. the question is weighted, say score 30, so when this question is answered with N/A, the MAX VALUE should be deducted by 30. Using the method you suggest, we only count how many N/A, then *10, so when one of the question with weighted 30, and it is answered as N/A. it would only be count as 1, then deducted 10 from Max Value, this is not correct. 

    I will try to see if I can do give the count as 3 for the question with max score 30, instead count as 1. Then see if the final answer will be correct. --Once I finished it, I will let you know the outcome

    By the way, is is possible to do as automatic duplicate field in the form. Let say, if I put a max score on each page, but I also want same field on the report summary page. Is it possible I can create a Max Value field on each page and the last page, so once a page is finished, I will get the Max Value field complete in that page and last page at the same time. 

    Thank you very much

     

     


  • Mike_G JotForm Support
    Replied on April 16, 2020 at 5:07 PM

    Just to make sure we are on the same page, may I ask that you clarify the following, please?

    Above you gave us this example:

    Question 1-7 got answer of 10,10,10,10,10,10 and N/A, which means total of score of 60, then I need to calculate the result in percentage: 60/60=100%.

    Questions 1-7 are multiple-choice (checkbox) fields, which means multiple selections are possible for each question. Let's say Question 1. FMEA has 2 selections. Does this means if there are two or more selection in a question

    1587067518zt16 03 33 Screenshot 10

    the total score will be calculated like this?

    18,10,10,10,10,10 and N/A, which means total of score of 68, then I need to calculate the result in percentage: 68/60=113.33%

    I understand that each question score adds (a maximum of) 10 to the divisor.

    If any question is skipped or has an answer of N/A, regardless if there are other selections, the question will still be removed from the equation. So if questions 1-6 each has 10 and question 7 has this:

    1587067879zt16 11 03 Screenshot 21

    The equation will still be like this, 10,10,10,10,10,10 and N/A. 

    As for your other concern, you can use the Duplicate feature of the form builder page to duplicate fields in your form. How-to-Manage-Multiple-Fields


  • FGAPM
    Replied on April 16, 2020 at 7:56 PM

    Hello

    Sorry for the confusion. 
    1. All questions is multiple choice, but only 1 answer will be allowed.

    2. Problem is for some question, I have put calculated weight in property. For example. Question 1,2,3,4,5, with question 3 has calculated Weight is 3 (10=30, 8=24, 4=12, 1=3, and NA) so when all 5 question is answered with 10, the actual score is 10+10+30+10+10=70, and Max value is 70, then the final score will be 70/70=100%. However, if question 3 is N/A or skipped, the final answer is 10++10+NA+10+10=40, and it the final score should be 40/40=100%. But because when we select N/A, it does not change Max value dynamically, the score would be 40/70=57.1%, this is not correct 


    pls help to find a solution 

    Thanks

    Ryan

  • KrisLei Jotform Support
    Replied on April 16, 2020 at 9:36 PM

    Hello Ryan, 

    Just to clarify, if the answer is equivalent to N/A it is no longer part of the max value? Kindly, verify if I have understood your requirements clearly:

    Max value = to the answers that have an equivalent numerical value

    IF the answer is N/A, it is no longer part of the max value, in short, it will be out of the equation

    If these are correct, kindly give me some time to come up for a workaround or a solution to your requirements. I will get back to you shortly.

    Thank you.

  • FGAPM
    Replied on April 17, 2020 at 12:03 AM

    Hello Kris

    Yes, you are correct. If the answer is N/A, it is no longer part of the max value and will be out of equation.

    Thank you very much 

    Ryan

  • FGAPM
    Replied on April 17, 2020 at 12:13 AM

    Hello Kris

    Yes, you are correct. If the answer is N/A, it is no longer part of the max value and will be out of equation.

    Thank you very much 

    Ryan

  • KrisLei Jotform Support
    Replied on April 17, 2020 at 3:24 PM

    My apologies for the delayed response. 

    I am thinking of assigning a negative value to N/A so that when the Max Value will be calculated with the negative value for N/A it will be automatically deducted on the equation, right?

    Based on your previous example: 

    For example. Question 1,2,3,4,5, with question 3 has calculated Weight is 3 (10=30, 8=24, 4=12, 1=3, and NA) so when all 5 question is answered with 10, the actual score is 10+10+30+10+10=70, and Max value is 70, then the final score will be 70/70=100%. However, if question 3 is N/A or skipped, the final answer is 10++10+NA+10+10=40, and it the final score should be 40/40=100%. But because when we select N/A, it does not change Max value dynamically, the score would be 40/70=57.1%, this is not correct  

    Where question 3 is N/A and if N/A's assigned value, for example, would be -10 the equation would be automatically 10+10+(-10)+10+10= 30 for the max value. 

    Does N/A have a weighted value as well, like the other answers? If it has then I think to assign a negative value on it will make the max value dynamic.

    Let us know if it didn't meet your requirements.

  • FGAPM
    Replied on April 17, 2020 at 3:29 PM

    Hi Kris

    Thank you for your response. 

    Yes, N/A need to have a weighted value. For example, if the question is weight at 30 for answer 10, it should be -30 if N/A is selected 

    Thanks

    Ryan

  • Mike_G JotForm Support
    Replied on April 17, 2020 at 5:35 PM

    Thank you for the clarification. I'll coordinate with my colleague, KrisLei, and we'll work on the solution to your concern.

    Once we have a solution, we will get back to you in this thread the soonest.


  • FGAPM
    Replied on April 17, 2020 at 6:40 PM

    Thank you very much. I think I found a solution. I just assigned an actual value to each N/A field, then add them up as Max.