<?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 Problem with Sum &amp; Count avoiding a dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922228#M981470</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, hope somebody can help me. I'll try to explain what I want to achieve. I have a data set with the following structure:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/95882_Captura.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;What I need, is a pivot table that allows to do this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="image-4 jive-image" height="91" src="https://community.qlik.com/legacyfs/online/95883_Captura.PNG" style="height: 90.9290322580645px; width: 696px;" width="696" /&gt;&lt;/P&gt;&lt;P&gt;I'm using the following expression to get the number of Total orders per employee regardless warehouse&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14394505587855623 jive_text_macro" jivemacro_uid="_14394505587855623" modifiedtitle="true"&gt;
&lt;P&gt;AGGR(Count(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;OrderN&lt;/SPAN&gt;), Employee)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the following to the number of orders with weight between 20-50 kg &lt;SPAN style="font-size: 13.3333330154419px;"&gt;per employee regardless warehouse&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14394494841061772" jivemacro_uid="_14394494841061772" modifiedtitle="true"&gt;
&lt;P&gt;Count(if((aggr(sum(kg),OrderN)&amp;gt;=20)AND (aggr(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;sum(kg),OrderN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;)&amp;lt;=50),1))&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt; but I get this result&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/95889_Captura.PNG" style="height: 91px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Shouldn't repeat the values in the two rows? Maybe this can´t be done.&lt;/P&gt;&lt;P&gt;Hope someone can enligthen me.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2015 07:30:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-13T07:30:34Z</dc:date>
    <item>
      <title>Problem with Sum &amp; Count avoiding a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922228#M981470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody, hope somebody can help me. I'll try to explain what I want to achieve. I have a data set with the following structure:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/95882_Captura.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;What I need, is a pivot table that allows to do this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="image-4 jive-image" height="91" src="https://community.qlik.com/legacyfs/online/95883_Captura.PNG" style="height: 90.9290322580645px; width: 696px;" width="696" /&gt;&lt;/P&gt;&lt;P&gt;I'm using the following expression to get the number of Total orders per employee regardless warehouse&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14394505587855623 jive_text_macro" jivemacro_uid="_14394505587855623" modifiedtitle="true"&gt;
&lt;P&gt;AGGR(Count(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;OrderN&lt;/SPAN&gt;), Employee)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the following to the number of orders with weight between 20-50 kg &lt;SPAN style="font-size: 13.3333330154419px;"&gt;per employee regardless warehouse&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14394494841061772" jivemacro_uid="_14394494841061772" modifiedtitle="true"&gt;
&lt;P&gt;Count(if((aggr(sum(kg),OrderN)&amp;gt;=20)AND (aggr(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;sum(kg),OrderN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;)&amp;lt;=50),1))&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt; but I get this result&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Captura.PNG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/95889_Captura.PNG" style="height: 91px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Shouldn't repeat the values in the two rows? Maybe this can´t be done.&lt;/P&gt;&lt;P&gt;Hope someone can enligthen me.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922228#M981470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-13T07:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Sum &amp; Count avoiding a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922229#M981471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The aggr() functions must include all the dimensions in the table:&lt;/P&gt;&lt;P&gt;=Count(if((aggr(sum(kg), OrderN, ....)&amp;gt;=20)AND (aggr(sum(kg), OrderN, .....)&amp;lt;=50),1)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;=Count(if((aggr(sum(kg), OrderN, WAREHOUSE)&amp;gt;=20)AND (aggr(sum(kg), OrderN, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;WAREHOUSE&lt;/SPAN&gt;)&amp;lt;=50),1))&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9pt; font-style: inherit; font-weight: inherit; color: black; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922229#M981471</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-13T07:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Sum &amp; Count avoiding a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922230#M981472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you send sample qlikview file.&lt;/P&gt;&lt;P&gt;I think you handle this problem with total &amp;lt;Dimension&amp;gt; keyword. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922230#M981472</guid>
      <dc:creator>jafari_ervin</dc:creator>
      <dc:date>2015-08-13T07:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Sum &amp; Count avoiding a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922231#M981473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for your time. The solution is the combination of both answers.&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 07:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Sum-Count-avoiding-a-dimension/m-p/922231#M981473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-13T07:50:58Z</dc:date>
    </item>
  </channel>
</rss>

