<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SUM 2 fields on 2 conditions... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709571#M674400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If use set analysis the syntax would as per below and sum(set analysis is more efficient than ifs&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Stage={'Contract'}&amp;gt;}[Contract Value])&lt;/P&gt;&lt;P&gt;+ sum({&amp;lt; Stage= {'Contract Negotiation' , 'Offer Negotiation'}&amp;gt;} [Pipeline Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Padma&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jul 2014 09:22:35 GMT</pubDate>
    <dc:creator>qlikoqlik</dc:creator>
    <dc:date>2014-07-19T09:22:35Z</dc:date>
    <item>
      <title>SUM 2 fields on 2 conditions...</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709567#M674396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I have a question re: summing. I want to SUM [Contract Value] when Stage is 'Contract' and add this to the SUM of [Pipeline Value] when Stage is 'Contract Negotiation' or 'Offer Negotiation'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen conditional sums in here, but they are typically summing one field when multiple conditions exist. Here I need to sum 2 fields when 2 or more conditions exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 03:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709567#M674396</guid>
      <dc:creator />
      <dc:date>2014-07-19T03:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: SUM 2 fields on 2 conditions...</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709568#M674397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum((If(Stage='Contract',ContractValue) and if(Stage='Contract Negotiation' or 'Offer Negotiation',[Pipeline Value]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 04:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709568#M674397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-19T04:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: SUM 2 fields on 2 conditions...</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709569#M674398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this!&amp;nbsp; I just had to tweak the "and" to an "or" and now it works, so I get what I need! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 04:48:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709569#M674398</guid>
      <dc:creator />
      <dc:date>2014-07-19T04:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: SUM 2 fields on 2 conditions...</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709570#M674399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF want to SUM [Contract Value] when Stage is 'Contract' and add this to the SUM of [Pipeline Value] when Stage is 'Contract Negotiation' or 'Offer Negotiation'. please see below code try to with this hopefully it will work out for your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum((If(Stage='Contract',ContractValue) and if(Stage='Contract Negotiation' or 'Offer Negotiation',[Pipeline Value]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 06:46:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709570#M674399</guid>
      <dc:creator />
      <dc:date>2014-07-19T06:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: SUM 2 fields on 2 conditions...</title>
      <link>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709571#M674400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If use set analysis the syntax would as per below and sum(set analysis is more efficient than ifs&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;Stage={'Contract'}&amp;gt;}[Contract Value])&lt;/P&gt;&lt;P&gt;+ sum({&amp;lt; Stage= {'Contract Negotiation' , 'Offer Negotiation'}&amp;gt;} [Pipeline Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Padma&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2014 09:22:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SUM-2-fields-on-2-conditions/m-p/709571#M674400</guid>
      <dc:creator>qlikoqlik</dc:creator>
      <dc:date>2014-07-19T09:22:35Z</dc:date>
    </item>
  </channel>
</rss>

