Sum and average only visible sections - can it be done? - InfoPath Dev
in

InfoPath Dev

Sum and average only visible sections - can it be done?

Last post 10-09-2012 05:44 PM by wapfunz. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-07-2012 03:42 PM

    Sum and average only visible sections - can it be done?

    Greetings, I have a form with 28 sections - an employee performance evaluation form. Not all sections are required for an emplyee hence the 28 sections show and hide dependent on the employees position in the food chain.

    Some employees will have 10 sections show, others 15 etc.

    Scoring is in 13 steps from 0 to 6

    Is it possible to sum only the visible sections and then find the average for those sections?

    I have looked at the other posts around this similar circumstance, and they do not quite resolve what I may require, as the sections are not repeating tables. 

    What I have for the sum (OverallPerformance (adds everything greater than 0):

    PerformanceAndResultOrientation + AssertiveAction + Communication + Leadership + Commitment + EffectiveUseOfManagementTools + ManagementBehaviourFosteringCreativity + ContinuedLearning + FlexibilityAndResilience + IntegrityHonesty + TeamBuilding + DecisivenessAndAccountability + ProblemSolving + Influence + InterpersonalSkills + TechnicalCredibility + TechnicalCommunications + Standards + InventorSkills + AutocadElectricalSkills + VaultSkills + SiteWork + AutomationDesignSkills + ElectricalDesignSkills + ServiceMotivation + Design + Partnering + CulturalAwareness[. > 0.0]

    What I have for the count of filelds greater than zero - means they have been filled:

    count(PerformanceAndResultOrientation | AssertiveAction | Communication | Leadership | Commitment | EffectiveUseOfManagementTools | ManagementBehaviourFosteringCreativity | ContinuedLearning | FlexibilityAndResilience | IntegrityHonesty | TeamBuilding | DecisivenessAndAccountability | ProblemSolving | Influence | InterpersonalSkills | TechnicalCredibility | TechnicalCommunications | Standards | InventorSkills | AutocadElectricalSkills | VaultSkills | SiteWork | AutomationDesignSkills | ElectricalDesignSkills | ServiceMotivation | Design | Partnering | CulturalAwareness[. > 0.0])

    So that my average would become:

    OverallPerformance / CountNo

    Thank you for your consideration and valued time.

    Best Regards
    Bill
  • 10-08-2012 12:01 PM In reply to

    Re: Sum and average only visible sections - can it be done?

    You can't filter based on what's in the visible section and what's not, unfortunately.

    If the field is not in the canvas, however, and the default value is 0, then including that field in the sum is not going to affect the result at all.

    So the sum of the filled out fields is just the sum of all the fields?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 10-08-2012 12:29 PM In reply to

    Re: Sum and average only visible sections - can it be done?

    Thank you Ernesto.

    mmmmmmmmmmmmm - thinking.

    If I reverse my thoughts - if I calculate all fields even if they are hidden (hidden will be zero) only the shown fields will be totalled, all fields will be totalled but the shown fields will be greater than zero. They will have a value greater than zero. Now if they have a value greater than zero then I could count those sections and divide into my total to get an average. Can I do it - mmmmmmmmmm. So if I make the zero value greater than zero , say 0.01 - mmmmmmmmmm - I could be onto something here - will get back.

    Best Regards
    Bill
  • 10-09-2012 05:44 PM In reply to

    Re: Sum and average only visible sections - can it be done?

    Yup it can work that way - hunch was right
    Best Regards
    Bill
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.