repeating table average with N/A field - InfoPath Dev
in

InfoPath Dev

repeating table average with N/A field

Last post 04-17-2009 10:33 PM by swathip. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-17-2009 07:56 AM

    • mattb
    • Not Ranked
    • Joined on 05-20-2008
    • Posts 15

    repeating table average with N/A field

    I have a repeating table with an average field.  Each row has a rating scale 1 - 5 plus an N/A field.  My average function works well but I can't figure out how to ignore the "N/A" field.  If value is set to 0 then the average is wrong.  How can I set the "N/A" field to a value with will not effect the average?

    -Thanks

  • 04-17-2009 10:33 PM In reply to

    Re: repeating table average with N/A field

    Hi,

    Add the following expression as the default value to the average field.

    xdMath:Avg(../my:group7/my:group8/my:field7[. != "N/A"])

     

    Here group8 is repeating table and field7 is the rating scale field.

    Hope it will solve your problem.

    Swathip
    www.ggktech.com
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.