Sum of fields with multiple conditions - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Sum of fields with multiple conditions

Last post 05-12-2014 10:48 AM by Katlj. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-12-2014 10:48 AM

    • Katlj
    • Not Ranked
    • Joined on 05-12-2014
    • Posts 1

    Sum of fields with multiple conditions

    I have a form which is going to be a financial statement summary of items from other lists.  I have a sum field that looks at another list, and if the items are in the BPD division, the request if for equipment, and the fiscal year is 14, it sums up the actual amount. Works great.  The current formula below works the way it's supposed to.

     sum(xdXDocument:GetDOM("JBLM NEC--Exhibit 6")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = "BPD"][d:Type_x0020_Of_x0020_Request = "Equipment"][d:FY = "14"]/d:Actual_x0020_Amount)

    The problem is, I dont want to go in every year to change the [d:FY = "14"] to the new FY.  I created another field on the form called Ex6SummaryFY1 for users to enter the FY they want to look at. I want the calculation to sum the actual amounts fields if the Divisons is BPD, the type is equipment, and the FY is the year the user enters into the Ex6SummaryFY1 field.

    Ive tried:

    sum(xdXDocument:GetDOM("JBLM NEC--Exhibit 6")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = "BPD"][d:Type_x0020_Of_x0020_Request = "Equipment"][d:FY = ../my:EX6SummaryFY1]/d:Actual_x0020_Amount)

    sum(xdXDocument:GetDOM("JBLM NEC--Exhibit 6")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = "BPD"][d:Type_x0020_Of_x0020_Request = "Equipment"][d:FY = d:EX6SummaryFY1]/d:Actual_x0020_Amount)

    sum(xdXDocument:GetDOM("JBLM NEC--Exhibit 6")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = "BPD"][d:Type_x0020_Of_x0020_Request = "Equipment"][d:FY = [EX6SummaryFY1]]/d:Actual_x0020_Amount)

    and a few other variations and I cant seem to get it there.  Any ideas? 

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