<?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 Re: Issue with count formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065228#M940941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;sum(TOTAL&lt;/STRONG&gt; aggr(Count(DISTINCT Position),District, Month, &lt;STRONG&gt;Position&lt;/STRONG&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jan 2016 12:15:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-25T12:15:33Z</dc:date>
    <item>
      <title>Issue with count formula</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065227#M940940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to achieve allocation of total territory's sales among of representatives that are covering it. For example, I have 3 representatives A1, A2, A2 on a terriotry A and sales are equal to 10. If I just drop position as dimension, I get total territory sales across each position:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/112459_1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;To fix that, I want to count number of positions covering this territory and divide total territory sales by number of positions. For that I tried below formula: =max(aggr(Count(DISTINCT Position),District, Month)), it works well only for the first position, the remaining positions are supressed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/112460_2.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Could you please help to understand why I am not able to achieve the desired result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. I am also attaching QV sample file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 11:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065227#M940940</guid>
      <dc:creator />
      <dc:date>2016-01-25T11:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with count formula</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065228#M940941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;sum(TOTAL&lt;/STRONG&gt; aggr(Count(DISTINCT Position),District, Month, &lt;STRONG&gt;Position&lt;/STRONG&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 12:15:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065228#M940941</guid>
      <dc:creator />
      <dc:date>2016-01-25T12:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with count formula</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065229#M940942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum(&lt;STRONG&gt;TOTAL&amp;lt;District,Month&amp;gt;&lt;/STRONG&gt; aggr(1 ,District, Month,Position))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 12:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065229#M940942</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-25T12:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with count formula</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065230#M940943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, that was quick!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 12:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065230#M940943</guid>
      <dc:creator />
      <dc:date>2016-01-25T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with count formula</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065231#M940944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you not an MVP stefan &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2016 12:26:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-count-formula/m-p/1065231#M940944</guid>
      <dc:creator />
      <dc:date>2016-01-25T12:26:33Z</dc:date>
    </item>
  </channel>
</rss>

