<?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 / Decrease in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155240#M31556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a flat sales table which, by customer, I have the sales for the past 5 financial years.&lt;/P&gt;&lt;P&gt;The user can pick a base finanical year and a comparison financial year ** and, on a detailed pivot, I show if the customers sales have either increased or decreased.&lt;/P&gt;&lt;P&gt;Base / comparison year is achieved by having buttons for each year which update variables varBase and varComparison.&lt;/P&gt;&lt;P&gt;Pivot table compares financial year with varBase and sums sales for same.&lt;/P&gt;&lt;P&gt;Comparison sales appear in a different column using same approach as above except with varComparison.&lt;/P&gt;&lt;P&gt;This works fine...&lt;/P&gt;&lt;P&gt;I have been asked to produce a second pivot table where, comparing varComparison against varBase, the user wants to see...&lt;/P&gt;&lt;P&gt;1) How many customers sales have grown.&lt;/P&gt;&lt;P&gt;2) The total sales for these "Growth" customers&lt;/P&gt;&lt;P&gt;3) How many customers sales have decreased.&lt;/P&gt;&lt;P&gt;4) The total sales for these "Decrease" customers.&lt;/P&gt;&lt;P&gt;Can anyone please give me some assistance as to how I achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Nov 2009 23:37:23 GMT</pubDate>
    <dc:creator>pkelly</dc:creator>
    <dc:date>2009-11-17T23:37:23Z</dc:date>
    <item>
      <title>Growth / Decrease</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155240#M31556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a flat sales table which, by customer, I have the sales for the past 5 financial years.&lt;/P&gt;&lt;P&gt;The user can pick a base finanical year and a comparison financial year ** and, on a detailed pivot, I show if the customers sales have either increased or decreased.&lt;/P&gt;&lt;P&gt;Base / comparison year is achieved by having buttons for each year which update variables varBase and varComparison.&lt;/P&gt;&lt;P&gt;Pivot table compares financial year with varBase and sums sales for same.&lt;/P&gt;&lt;P&gt;Comparison sales appear in a different column using same approach as above except with varComparison.&lt;/P&gt;&lt;P&gt;This works fine...&lt;/P&gt;&lt;P&gt;I have been asked to produce a second pivot table where, comparing varComparison against varBase, the user wants to see...&lt;/P&gt;&lt;P&gt;1) How many customers sales have grown.&lt;/P&gt;&lt;P&gt;2) The total sales for these "Growth" customers&lt;/P&gt;&lt;P&gt;3) How many customers sales have decreased.&lt;/P&gt;&lt;P&gt;4) The total sales for these "Decrease" customers.&lt;/P&gt;&lt;P&gt;Can anyone please give me some assistance as to how I achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 23:37:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155240#M31556</guid>
      <dc:creator>pkelly</dc:creator>
      <dc:date>2009-11-17T23:37:23Z</dc:date>
    </item>
    <item>
      <title>Growth / Decrease</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155241#M31557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;I think below is something like what you are looking for:&lt;/P&gt;&lt;P&gt;1) How many customers sales have grown.&lt;/P&gt;&lt;P&gt;=count(distinct if(sales&amp;gt;0,customer_no))&lt;BR /&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;OR&lt;/B&gt;&lt;BR /&gt;=count(distinct if(varComparison&amp;gt;0,customer_no))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2) The total sales for these "Growth" customers&lt;/P&gt;&lt;P&gt;=sum(if(sales&amp;gt;0,sales))&lt;BR /&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;OR&lt;/B&gt;&lt;BR /&gt;=sum(if(varComparison&amp;gt;0,sales))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;3) How many customers sales have decreased.&lt;/P&gt;&lt;P&gt;=count(distinct if(sales&amp;lt;=0,customer_no))&lt;BR /&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;OR&lt;/B&gt;&lt;BR /&gt;=count(distinct if(varComparison&amp;lt;=0,customer_no))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;4) The total sales for these "Decrease" customers.&lt;/P&gt;&lt;P&gt;=sum(if(sales&amp;lt;=0,sales))&lt;BR /&gt;&lt;B style="mso-bidi-font-weight:normal;"&gt;OR&lt;/B&gt;&lt;BR /&gt;=sum(if(varComparison&amp;lt;=0,sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 00:33:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155241#M31557</guid>
      <dc:creator />
      <dc:date>2009-11-18T00:33:20Z</dc:date>
    </item>
    <item>
      <title>Growth / Decrease</title>
      <link>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155242#M31558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So your growth column is something like sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)-sum({&amp;lt;Year={$(varComparison)}&amp;gt;}Sales)? For that, here are my untested guesses for your new expressions:&lt;/P&gt;&lt;P&gt;1) How many customers sales have grown.&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)&amp;gt;sum({&amp;lt;Year={$(varComparison)}&amp;gt;}Sales),1),Customer))&lt;/P&gt;&lt;P&gt;2) The total sales for these "Growth" customers&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)&amp;gt;sum({&amp;lt;Year={$(varComparison)}&amp;gt;}Sales),sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)),Customer))&lt;/P&gt;&lt;P&gt;3) How many customers sales have decreased.&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)&amp;lt;sum({&amp;lt;Year={$(varComparison)}&amp;gt;}Sales),1),Customer))&lt;/P&gt;&lt;P&gt;4) The total sales for these "Decrease" customers.&lt;/P&gt;&lt;P&gt;sum(aggr(if(sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)&amp;lt;sum({&amp;lt;Year={$(varComparison)}&amp;gt;}Sales),sum({&amp;lt;Year={$(varBase)}&amp;gt;}Sales)),Customer))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 00:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Growth-Decrease/m-p/155242#M31558</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-11-18T00:46:03Z</dc:date>
    </item>
  </channel>
</rss>

