<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Sum of fields with multiple conditions</title><link>https://www.infopathdev.com:443/forums/thread/97440.aspx</link><pubDate>Mon, 12 May 2014 17:48:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97440</guid><dc:creator>Katlj</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97440.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97440</wfw:commentRss><description>&lt;p&gt;I have a form which is going to be a financial statement summary of items from other lists.&amp;nbsp; 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.&amp;nbsp; The current formula below&amp;nbsp;works&amp;nbsp;the way it&amp;#39;s supposed to. &lt;/p&gt;&lt;p&gt;&amp;nbsp;sum(xdXDocument:GetDOM(&amp;quot;JBLM NEC--Exhibit 6&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = &amp;quot;BPD&amp;quot;][d:Type_x0020_Of_x0020_Request = &amp;quot;Equipment&amp;quot;][d:FY = &amp;quot;14&amp;quot;]/d:Actual_x0020_Amount)&lt;/p&gt;&lt;p&gt;The problem is, I dont want to go in every year to change the [d:FY = &amp;quot;14&amp;quot;] to the new FY.&amp;nbsp; I created another field on the&amp;nbsp;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.&lt;/p&gt;&lt;p&gt;Ive tried:&lt;/p&gt;&lt;p&gt;sum(xdXDocument:GetDOM(&amp;quot;JBLM NEC--Exhibit 6&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = &amp;quot;BPD&amp;quot;][d:Type_x0020_Of_x0020_Request = &amp;quot;Equipment&amp;quot;][d:FY = ../my:EX6SummaryFY1]/d:Actual_x0020_Amount)&lt;/p&gt;&lt;p&gt;sum(xdXDocument:GetDOM(&amp;quot;JBLM NEC--Exhibit 6&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = &amp;quot;BPD&amp;quot;][d:Type_x0020_Of_x0020_Request = &amp;quot;Equipment&amp;quot;][d:FY = d:EX6SummaryFY1]/d:Actual_x0020_Amount)&lt;/p&gt;&lt;p&gt;sum(xdXDocument:GetDOM(&amp;quot;JBLM NEC--Exhibit 6&amp;quot;)/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:DIV = &amp;quot;BPD&amp;quot;][d:Type_x0020_Of_x0020_Request = &amp;quot;Equipment&amp;quot;][d:FY = [EX6SummaryFY1]]/d:Actual_x0020_Amount)&lt;/p&gt;&lt;p&gt;and a few other&amp;nbsp;variations and I&amp;nbsp;cant seem to get it there.&amp;nbsp;&amp;nbsp;Any ideas?&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>