<?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 Function aggr and function max in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Function-aggr-and-function-max/m-p/282425#M104997</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;In an input file I have sales data:&lt;/P&gt;&lt;P&gt;Year (Year), Id Sale (IdSales), Id Customer (IdCustomer) and&amp;nbsp; Id Country (IdCountry).&lt;/P&gt;&lt;P&gt;I want to analyze how many customers have 1 sales 2 sales across the country ....&lt;/P&gt;&lt;P&gt;I used a pivot table with IdCountry as dimension&amp;nbsp; and expression&amp;nbsp; as:&lt;/P&gt;&lt;P&gt;Count (if (aggr (count (IdSales) IdCountry, IdCustomer) = 2, IdCustomer)) &lt;/P&gt;&lt;P&gt;to count how many customers have, for example, 3 sales.&lt;/P&gt;&lt;P&gt;How can I do to make sure that the table refers, without any active selection, the maximum value of the year (in my case 2011).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank All&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2011 14:14:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-18T14:14:14Z</dc:date>
    <item>
      <title>Function aggr and function max</title>
      <link>https://community.qlik.com/t5/QlikView/Function-aggr-and-function-max/m-p/282425#M104997</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;In an input file I have sales data:&lt;/P&gt;&lt;P&gt;Year (Year), Id Sale (IdSales), Id Customer (IdCustomer) and&amp;nbsp; Id Country (IdCountry).&lt;/P&gt;&lt;P&gt;I want to analyze how many customers have 1 sales 2 sales across the country ....&lt;/P&gt;&lt;P&gt;I used a pivot table with IdCountry as dimension&amp;nbsp; and expression&amp;nbsp; as:&lt;/P&gt;&lt;P&gt;Count (if (aggr (count (IdSales) IdCountry, IdCustomer) = 2, IdCustomer)) &lt;/P&gt;&lt;P&gt;to count how many customers have, for example, 3 sales.&lt;/P&gt;&lt;P&gt;How can I do to make sure that the table refers, without any active selection, the maximum value of the year (in my case 2011).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank All&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 14:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-aggr-and-function-max/m-p/282425#M104997</guid>
      <dc:creator />
      <dc:date>2011-08-18T14:14:14Z</dc:date>
    </item>
    <item>
      <title>Function aggr and function max</title>
      <link>https://community.qlik.com/t5/QlikView/Function-aggr-and-function-max/m-p/282426#M104998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding my previous question, I changed the table and i created a pivot table in which the dimensions are:&lt;/P&gt;&lt;P&gt;1-a calculate dimension:&lt;/P&gt;&lt;P&gt;=aggr(Count(IdSales),IdCountry,IdCustomer)&lt;/P&gt;&lt;P&gt;2-Another dimension:&amp;nbsp;&amp;nbsp;&amp;nbsp; IdCountry&lt;/P&gt;&lt;P&gt;I have an expression like: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(distinct IdCustomer)&lt;/P&gt;&lt;P&gt;To make the table con the maximum value of the year, I modified the calcutated dimension like: &lt;/P&gt;&lt;P&gt;=aggr((Count({$ &amp;lt;Year={$(=Max(Year))}&amp;gt;}&amp;nbsp;&amp;nbsp; IdSales )),IdCountry,IdCustomer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it does not work.&lt;/P&gt;&lt;P&gt;Can anyone give me some help? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 14:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-aggr-and-function-max/m-p/282426#M104998</guid>
      <dc:creator />
      <dc:date>2011-08-24T14:34:55Z</dc:date>
    </item>
  </channel>
</rss>

