<?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 Growth calculation in Pivot Chart - possible via Set Analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Growth-calculation-in-Pivot-Chart-possible-via-Set-Analysis/m-p/593210#M219904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;haven't found a clue in the usual resources, so I need to ask for help here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot chart where the periods (months or years) are displayed column-wise. I want to calculate growth versus previous year using the simple formula &amp;lt;Sales&amp;gt;/&amp;lt;Previous Year Sales&amp;gt; - 1. The calendar information are in a date field, normalized to the first of the respective month, as I need only monthly information. Date format is YYYY-MMM. Before() is not an option, as I want the growth information to be independent from the selection (a growth versus last year's December remains a growth vs. last year's December, even if last year's December is not selected)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My idea was using set analysis in a way like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(VALUE_TSD) / sum({&amp;lt;FC_PERIOD = {"1(=Date(addDate(FC_PERIOD,-12),'YYYY-MMM'))"}&amp;gt;} VALUE_TSD) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work. It seems like the FC_PERIOD in curly brackets returns all possible values and thus makes the calculation fold. Matter of fact, it works fine, when I simply insert a string like "2013-Nov" or an aggregation like MAX(FC_PERIOD) which by definition returns but one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: is there a way to pass the FC_PERIOD value which is related to the corresponding column to the formula? Or do I need to address all this in the data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for all replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jan 2014 10:44:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-31T10:44:45Z</dc:date>
    <item>
      <title>Growth calculation in Pivot Chart - possible via Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-calculation-in-Pivot-Chart-possible-via-Set-Analysis/m-p/593210#M219904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;haven't found a clue in the usual resources, so I need to ask for help here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot chart where the periods (months or years) are displayed column-wise. I want to calculate growth versus previous year using the simple formula &amp;lt;Sales&amp;gt;/&amp;lt;Previous Year Sales&amp;gt; - 1. The calendar information are in a date field, normalized to the first of the respective month, as I need only monthly information. Date format is YYYY-MMM. Before() is not an option, as I want the growth information to be independent from the selection (a growth versus last year's December remains a growth vs. last year's December, even if last year's December is not selected)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My idea was using set analysis in a way like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(VALUE_TSD) / sum({&amp;lt;FC_PERIOD = {"1(=Date(addDate(FC_PERIOD,-12),'YYYY-MMM'))"}&amp;gt;} VALUE_TSD) - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work. It seems like the FC_PERIOD in curly brackets returns all possible values and thus makes the calculation fold. Matter of fact, it works fine, when I simply insert a string like "2013-Nov" or an aggregation like MAX(FC_PERIOD) which by definition returns but one value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is: is there a way to pass the FC_PERIOD value which is related to the corresponding column to the formula? Or do I need to address all this in the data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for all replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 10:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-calculation-in-Pivot-Chart-possible-via-Set-Analysis/m-p/593210#M219904</guid>
      <dc:creator />
      <dc:date>2014-01-31T10:44:45Z</dc:date>
    </item>
  </channel>
</rss>

