How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

Last post 11-04-2010 05:35 AM by KRE30A. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 10-27-2010 02:05 AM

    • KRE30A
    • Not Ranked
    • Joined on 10-24-2010
    • Posts 4

    How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    I have an evaluation form that I created that has 14 different evaluation areas in it(Planning, Budgeting, etc).  Within each of these 14 areas there are various "traits" that a person is rated of from one to 10.  As I rate each trait I get an average for the entire area being evaluated.  That evaluation total is then populated in an "Overall Evaluation" summary section which captures the final average for each evaluation area.  I then have a final score area which sums up all of the 14 averages and divides them by 14.  The problem is, is there is one evaluation area in which an individual is not rated, this total will be "0" and I need to exclude that "0" from the final score (which normally would divide all scores by 14).  This in turn, throws the average off.

     Any help would be appreciated.

  • 10-27-2010 06:40 AM In reply to

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    Hi, I can replicate your problem can you attach your form? When you reply select option and attach your template.

    Thanks,

  • 10-27-2010 09:17 AM In reply to

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    Instead of dividing by 14, divide by count(items[. != 0])

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-28-2010 02:00 AM In reply to

    • KRE30A
    • Not Ranked
    • Joined on 10-24-2010
    • Posts 4

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    Example of current formula:  Here is the formula -  sum(PlanningScore | BudgetingScore | TeamScore | ReportScore | CommunicationScore | Testing Score)/6

     

    Being a novice to this, I am not quite sure how to enter what you have suggested above in that the error that I get is "Node-test expected".

  • 10-28-2010 02:07 AM In reply to

    • KRE30A
    • Not Ranked
    • Joined on 10-24-2010
    • Posts 4

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    Example of current formula(Note, I did not enter all 14 areas:

     

    Here is the formula - sum(PlanningScore | BudgetingScore | TeamScore | ReportScore | CommunicationScore | Testing Score)/6

  • 10-28-2010 06:51 PM In reply to

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

     Hi, why you don't use the function avg() instead of sum() and divide by the total ?

  • 11-04-2010 05:35 AM In reply to

    • KRE30A
    • Not Ranked
    • Joined on 10-24-2010
    • Posts 4

    Re: How do I calculate an average of 14 different totals yet omit any totals with a sum of "0" from the average?

    It worked! All I did was replace sum with AVG and it is doing exactly what I wanted.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.