<?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: Conditional Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670018#M1082401</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By this you are also get correct result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(A) &amp;lt; 0, 0, sum(A)) +&lt;/P&gt;&lt;P&gt;if(sum(B) &amp;lt; 0, 0, sum(B)) +&lt;/P&gt;&lt;P&gt;if(sum(C) &amp;lt; 0, 0, sum(C))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:- Instead you select Sum of rows from the properties but Rangesum is right way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See snap here:-&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sumrows.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61336_Sumrows.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2014 11:18:40 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2014-06-27T11:18:40Z</dc:date>
    <item>
      <title>Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670016#M1082399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to add up the measure (for each row) only if they are +ve.&lt;/P&gt;&lt;P&gt;The underlying data for a catalog 1123CB is as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 426px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="81"&gt;catalog&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="89"&gt;Area&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="64"&gt;C&lt;/TD&gt;&lt;TD class="xl67" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="64"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;1123CB&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;Pune&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;-80&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;32&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;55&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;87&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;1123CB&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;Mumbai&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;170&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;-65&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;15&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;185&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;1123CB&lt;/TD&gt;&lt;TD class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;Chennai&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;24&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;122&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;-9&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;146&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At Qlikview level, I have to display Catalog and Totals only.&lt;/P&gt;&lt;P&gt;Totals for catalog 1123CB should be 87+185+146 = 418&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following formula in Qlikview to achieve this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;lt;0, 0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) +(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;lt;0,0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) )) +(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &amp;lt;0, 0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But the above gives me total of 264 as it does a Sum of Measures A,B,C and then applies for the formula. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can I achieve this, please advise ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670016#M1082399</guid>
      <dc:creator />
      <dc:date>2014-06-27T11:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670017#M1082400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum(rangesum(rangemax(A,0),rangemax(B,0),rangemax(C,0)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670017#M1082400</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-06-27T11:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670018#M1082401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By this you are also get correct result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(A) &amp;lt; 0, 0, sum(A)) +&lt;/P&gt;&lt;P&gt;if(sum(B) &amp;lt; 0, 0, sum(B)) +&lt;/P&gt;&lt;P&gt;if(sum(C) &amp;lt; 0, 0, sum(C))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:- Instead you select Sum of rows from the properties but Rangesum is right way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See snap here:-&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sumrows.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61336_Sumrows.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670018#M1082401</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-06-27T11:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670019#M1082402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plese find attached application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670019#M1082402</guid>
      <dc:creator />
      <dc:date>2014-06-27T11:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670020#M1082403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum of rows - doesnot make any difference.&lt;/P&gt;&lt;P&gt;Rangesum works !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670020#M1082403</guid>
      <dc:creator />
      <dc:date>2014-06-27T11:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670021#M1082404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=RangeMax(A,0)+RangeMax(B,0)+RangeMax(C,0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 11:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/670021#M1082404</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2014-06-27T11:47:59Z</dc:date>
    </item>
  </channel>
</rss>

