Calculating the avg of radio buttons, where one option is NA - InfoPath Dev
in

InfoPath Dev

Calculating the avg of radio buttons, where one option is NA

Last post 11-06-2008 10:02 AM by saj322. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-06-2008 09:05 AM

    • saj322
    • Not Ranked
      Female
    • Joined on 11-06-2008
    • Posts 2

    Calculating the avg of radio buttons, where one option is NA

    I created a form that has multiple tables made up of radio buttons. For 2 of my tables "N/A" is an option. How do i write a formula for these tables, so that when the user picks "N/A", that value does not get counted and included in the avg function? I am using this as my formula:

    xdMath:Avg(../my:field106 | ../my:field107 | ../my:field108 | ../my:field109 | ../my:field110)

    For one table, all fields have an N/A radio button option. And for the other table, only one field has an N/A option button.

    Thanks!

  • 11-06-2008 09:51 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Calculating the avg of radio buttons, where one option is NA

    Hi,

    Try this

    xdMath:Avg(../my:field106[.!='N/A'] | ../my:field107[.!='N/A'] | ../my:field108[.!='N/A'] | ../my:field109[.!='N/A'] | ../my:field110[.!='N/A'])

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 11-06-2008 10:02 AM In reply to

    • saj322
    • Not Ranked
      Female
    • Joined on 11-06-2008
    • Posts 2

    Re: Calculating the avg of radio buttons, where one option is NA

    Perfect - worked perfectly!

     Thanks so much!

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.