sum unique rows - InfoPath Dev
in

InfoPath Dev

sum unique rows

Last post 11-17-2014 09:35 AM by SusanP. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-12-2014 02:36 PM

    sum unique rows

    I have a form with a repeating table of projects with budgets, and a project may be selected more than once:

    field1         field2
    Project A   $20
    Project B   $30
    Project A   $20
    Project C   $10

    I want to sum field2 for the UNIQUE projects selected, e.g.  A + B + C = $60 (not A + B + A + C = $80)

    this doesn't sum anything:  sum(my:group1/my:group2/my:field2[../my:field1[current()] != preceding-sibling::my:field1])

    any ideas?  thank you!

    Susan Pierce
    University of Texas at Arlington
  • 11-17-2014 07:11 AM In reply to

    Hi Susan,

    I am attaching a form which uses a hidden field (field 3) as basis if items in field 1 did repeated or not. A repeated value returns1, and if it did not repeat, field 3 is equal to 0. Hope this helps.

    Regards,

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 11-17-2014 09:35 AM In reply to

     Most helpful.  Thank you!!

    Susan Pierce
    University of Texas at Arlington
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.