Calculated values from Yes/No decisions - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Calculated values from Yes/No decisions

Last post 11-15-2021 09:17 PM by KadeshaAsejo. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-11-2013 09:27 AM

    Calculated values from Yes/No decisions

    Hi

    Any guidance

    Scenario QA Form, have to work out a percentage final score based on the 16 answers responses

    16 questions with Yes No and some N/A as answers. 

    No is fine it does not add to the score. YES and N/A would adjust the score percentage

     i.e.  16 yes responses would be 6.25 x 16 questions to give you a score of 100%  If one N/A was used the percentages adjust i.e  15 yes and one n/a  so percentage would be based on 15 answers.

    What I have done so far, Text boxes with rule If question XX is yes then set text box to 6.25%  and a final score calculated value adding them all together. It is creating the rules that I need to work out with N/A adjusting.

    Any help would be appreciated, or knowing going down the wrong route and there will be a easier, simplier solution.

    SB

  • 04-12-2013 04:39 AM In reply to

    Re: Calculated values from Yes/No decisions

     For this kind of thing I immediately turn to Excel. 9 times out of 10 if you can do it in Excel you can do it in InfoPath/SharePoint.

    You may also want to look at SharePoint and calculated columns.

    So if I've understood you correctly. This is how I've just done it.

    For each NA you minus 1 from the total of possible questions.

    I'm not sure how practical my solution is - depends on the number of questions?

    I set up a form up with 16 Question fields. Each question field as QuestionX . X being a number.

    I then set up a Calculations section with the following fields and formulas (you could hide this from public view)

    Total Possible Answers - count(Question1 | Question2 | Question3 | Question4 | Question5 | Question6 | Question7 | Question8 | Question9 | Question10 | Question11 | Question12 | Question13 | Question14 | Question15 | Question16)

    Number of Yes - count(Question1[. = "yes"] | Question2[. = "yes"] | Question3[. = "yes"] | Question4[. = "yes"] | Question5[. = "yes"] | Question6[. = "yes"] | Question6[. = "yes"] | Question7[. = "yes"] | Question8[. = "yes"] | Question9[. = "yes"] | Question10[. = "yes"] | Question11[. = "yes"] | Question11[. = "yes"] | Question12[. = "yes"] | Question13[. = "yes"] | Question14[. = "yes"] | Question15[. = "yes"] | Question16[. = "yes"])

    Number of No - count(Question1[. = "no"] | Question2[. = "no"] | Question3[. = "no"] | Question4[. = "no"] | Question5[. = "no"] | Question6[. = "no"] | Question6[. = "no"] | Question7[. = "no"] | Question8[. = "no"] | Question9[. = "no"] | Question10[. = "no"] | Question11[. = "no"] | Question11[. = "no"] | Question12[. = "no"] | Question13[. = "no"] | Question14[. = "no"] | Question15[. = "no"] | Question16[. = "no"])

    Number of NA - count(Question1[. = "na"] | Question2[. = "na"] | Question3[. = "na"] | Question4[. = "na"] | Question5[. = "na"] | Question6[. = "na"] | Question6[. = "na"] | Question7[. = "na"] | Question8[. = "na"] | Question9[. = "na"] | Question10[. = "na"] | Question11[. = "na"] | Question11[. = "na"] | Question12[. = "na"] | Question13[. = "na"] | Question14[. = "na"] | Question15[. = "na"] | Question16[. = "na"])

    Total Possible Answers Minus NA - TotalPossibleAnswers - NumberOfNA (field names)

    Percentage To Use - TotalPossibleAnswersMinusNA (fieldname)

    Percentage Calculation - NumberofYes / PercentageToUse * 100 (fieldnames)*100

     

    You mention 6.25. I assume you'll be adding this to an amount somewhere. Not sure what it was connected with or to. Again, hit excel and you'll easily be able to work it out.  Yes 16*6.25 = 100 but is it now necessary?

  • 11-15-2021 09:17 PM In reply to

    Re: Calculated values from Yes/No decisions

    Hello, I am also doing the same project, in which if we choose N/A, the value of that will distribute to other parameters. Is there a way wherein we can covert this excel formula to Infopath? =IFERROR(SUM(J16:J37)/(100-(SUMIF(E16:E37,"N/A",D16:D37))),0) J16:J37 = sum of the points 100 = default E16:E37 = counting of how many "N/A" D16:D37 = the value of the N/A in E16:E37 Hope you can also answer. Thank you very much!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.