<?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 Straight Table: sum(amount) when condition is fulfilled... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261722#M496628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2012 09:54:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-10T09:54:26Z</dc:date>
    <item>
      <title>Straight Table: sum(amount) when condition is fulfilled...</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261720#M496626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm making a straight table with a sum of purchases shown for each month. This first column is for cloths, the next for household goods etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;making the sum is not difficult: Sum(amount) but when I add an 'if' so I only include items that are cloths (for example Goods='cloths') the result is always zero. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whats wrong with this statement as expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Goods='Cloths',sum(Amount),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should be changed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 07:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261720#M496626</guid>
      <dc:creator />
      <dc:date>2012-01-10T07:44:26Z</dc:date>
    </item>
    <item>
      <title>Straight Table: sum(amount) when condition is fulfilled...</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261721#M496627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Sum(If(Goods='Cloths',Amount))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 07:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261721#M496627</guid>
      <dc:creator>vijay_iitkgp</dc:creator>
      <dc:date>2012-01-10T07:52:40Z</dc:date>
    </item>
    <item>
      <title>Straight Table: sum(amount) when condition is fulfilled...</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261722#M496628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 09:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261722#M496628</guid>
      <dc:creator />
      <dc:date>2012-01-10T09:54:26Z</dc:date>
    </item>
    <item>
      <title>Straight Table: sum(amount) when condition is fulfilled...</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261723#M496629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Just a small point - avoid using 'if' wherever possible as it has a perfomance overhead particularily with large amounts of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be more efficient:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(pick(match(Goods,'Cloths'), Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrads,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 10:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-sum-amount-when-condition-is-fulfilled/m-p/261723#M496629</guid>
      <dc:creator />
      <dc:date>2012-01-10T10:19:55Z</dc:date>
    </item>
  </channel>
</rss>

