<?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 Conditional Sum in Pivot Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Sum-in-Pivot-Table/m-p/337826#M494177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one way to do it is,create one more column which has status of last year.Then u can use if(status_LY='IF,sum({&amp;lt;status={'IF','TM}&amp;gt;}value,if(status_LY='TM,sum({&amp;lt;status={'TM'}&amp;gt;}value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create&amp;nbsp; status of last year in script ,u can use previous or peek function but first u need to arrange your data by year ascending and by id.the syntax can be:&amp;nbsp; if(id=peek(id),peek(status),0) as status_LY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Apr 2012 04:41:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-05T04:41:20Z</dc:date>
    <item>
      <title>Conditional Sum in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum-in-Pivot-Table/m-p/337825#M494176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check attached file. In this case, I want to sum 'VALUE' by 'STATUS'. But the condition is check the STATUS in last year. If the status is 'IF', sum all the value (IF+TM) with the same ID, but if last year STATUS is 'TM', just sum value where the STATUS&amp;nbsp; is 'TM' in the same ID. I want to use setting analysis in the expression. Can you show me the expression? Thanks before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 23:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum-in-Pivot-Table/m-p/337825#M494176</guid>
      <dc:creator />
      <dc:date>2012-04-04T23:58:26Z</dc:date>
    </item>
    <item>
      <title>Conditional Sum in Pivot Table</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum-in-Pivot-Table/m-p/337826#M494177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one way to do it is,create one more column which has status of last year.Then u can use if(status_LY='IF,sum({&amp;lt;status={'IF','TM}&amp;gt;}value,if(status_LY='TM,sum({&amp;lt;status={'TM'}&amp;gt;}value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create&amp;nbsp; status of last year in script ,u can use previous or peek function but first u need to arrange your data by year ascending and by id.the syntax can be:&amp;nbsp; if(id=peek(id),peek(status),0) as status_LY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 04:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum-in-Pivot-Table/m-p/337826#M494177</guid>
      <dc:creator />
      <dc:date>2012-04-05T04:41:20Z</dc:date>
    </item>
  </channel>
</rss>

