<?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: Count Distinct or Count Aggr doesn't return correct values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074727#M924001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave the wrong example, that's a simple chart and there it works fine.&lt;/P&gt;&lt;P&gt;In a complex chart It's another story.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll send a correct attach of the complex example showing the wrong values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Apr 2016 10:43:48 GMT</pubDate>
    <dc:creator>amber2000</dc:creator>
    <dc:date>2016-04-07T10:43:48Z</dc:date>
    <item>
      <title>Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074724#M923998</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;&lt;/P&gt;&lt;P&gt;I'm having difficulties to use a Count distinct() or Count Aggr()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My table haas duplicate values on column SD_Dest_Pallet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to count the Distinct SD_Dest_Pallet's per Date/Aisle_Facturation/Shop_Ens/&lt;/P&gt;&lt;P&gt;Even the simple sum of SD_Shipped_Colli isn't correct, I'll always get 5 colli to much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example (that's attached) I'm using only 1 Aisle_Facturation and 1 Shop_Ens tot test the expressions.&lt;/P&gt;&lt;P&gt;I've a chart with a distinct(Count) and another chart with a Aggr (count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are the correct values that should be presented in Qlikview:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="236" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 465px; height: 239px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="64"&gt;SD_Close_Date&lt;/TD&gt;&lt;TD class="xl63" height="20" width="64"&gt;Aisle_Facturation&lt;/TD&gt;&lt;TD class="xl63" height="20" style="width: 158px;" width="64"&gt;Shop_Ens&lt;/TD&gt;&lt;TD class="xl63" height="20" width="64"&gt;#Colli&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;#Pallet&lt;/TD&gt;&lt;TD class="xl63" width="87"&gt;Colli / Pal Uit&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160331&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;PBL_OVERIGE&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;401&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl64"&gt;80,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160401&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;591&lt;/TD&gt;&lt;TD class="xl63"&gt;10&lt;/TD&gt;&lt;TD class="xl64"&gt;59,10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160402&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;341&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl64"&gt;68,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160404&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;396&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl64"&gt;79,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160405&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;1015&lt;/TD&gt;&lt;TD class="xl63"&gt;6&lt;/TD&gt;&lt;TD class="xl64"&gt;169,17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160406&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;328&lt;/TD&gt;&lt;TD class="xl63"&gt;5&lt;/TD&gt;&lt;TD class="xl64"&gt;65,60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;20160407&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;50&lt;/TD&gt;&lt;TD class="xl63"&gt;0&lt;/TD&gt;&lt;TD class="xl64"&gt;0,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;TOTAL&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;&lt;/TD&gt;&lt;TD class="xl63" height="20"&gt;3122&lt;/TD&gt;&lt;TD class="xl63"&gt;36&lt;/TD&gt;&lt;TD class="xl64"&gt;86,72&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone see where the problem is situated in my example please???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074724#M923998</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074725#M923999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You aggr solution seems to be working, not sure what the issue is?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/120883_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074725#M923999</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-07T10:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074726#M924000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't the Aggr() chart show exactely these numbers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:33:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074726#M924000</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-07T10:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074727#M924001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave the wrong example, that's a simple chart and there it works fine.&lt;/P&gt;&lt;P&gt;In a complex chart It's another story.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll send a correct attach of the complex example showing the wrong values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:43:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074727#M924001</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2016-04-07T10:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074728#M924002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya unless we are able to see the issue, it would be difficult to propose a solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074728#M924002</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-07T10:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074729#M924003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the example with the wrong values.&lt;/P&gt;&lt;P&gt;Both charts show different results and both are wrong results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074729#M924003</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2016-04-07T10:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074730#M924004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to count something per multiple dimensions, you should use these dimensions in the aggr() dimensions as well...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Count({$ &amp;lt;[SD_WH] -= {12}, [Aisle_Zone] -= {PBS_Containers, PBS_Displays}&amp;gt; }aggr(count([Aisle_Facturation]), SD_Dest_Pallet))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add your charts dimensions to the aggr() dimension list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And probably you need to use Sum() as your outer aggregation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 10:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074730#M924004</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-07T10:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074731#M924005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the correct output you are hoping to see?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074731#M924005</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-07T11:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074732#M924006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, would be helpful to know the expected ouput.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= &lt;STRONG&gt;Sum&lt;/STRONG&gt;({$ &amp;lt;[SD_WH] -= {12}, [Aisle_Zone] -= {PBS_Containers, PBS_Displays}&amp;gt; }&lt;/P&gt;&lt;P&gt;aggr(&lt;/P&gt;&lt;P&gt;count(&lt;STRONG&gt;{$ &amp;lt;[SD_WH] -= {12}, [Aisle_Zone] -= {PBS_Containers, PBS_Displays}&amp;gt; }[&lt;/STRONG&gt;Aisle_Facturation])&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;, [$(=GetCurrentField( Aisle ))] ,[$(=GetCurrentField( Enseigne ))], [$(=GetCurrentField(&amp;nbsp; Periods ))]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Sum as outer aggregation&lt;/P&gt;&lt;P&gt;2) set expression used in both aggregations (not sure if you need to modify&lt;/P&gt;&lt;P&gt;3) full list of dimensions to group by.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you also need a count distinct here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure, missing the expected result or full description of logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:09:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074732#M924006</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-07T11:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074733#M924007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Output that I showed in my initial question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 518px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" width="101"&gt;SD_Close_Date&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="101"&gt;Aisle_Facturation&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="101"&gt;Shop_Ens&lt;/TD&gt;&lt;TD class="xl70" style="border-left: none;" width="64"&gt;#Colli&lt;/TD&gt;&lt;TD class="xl70" style="border-left: none;" width="64"&gt;#Pallet&lt;/TD&gt;&lt;TD class="xl70" style="border-left: none;" width="87"&gt;Colli / Pal Uit&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160331&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;401&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;80,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160401&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;591&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;59,10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160402&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;341&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;68,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160404&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;396&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;79,20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160405&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;169,17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160406&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;328&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;65,60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;20160407&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;PBL_Overige&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Pricelist_Hyper&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;0,00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71"&gt;&lt;/TD&gt;&lt;TD class="xl71"&gt;&lt;/TD&gt;&lt;TD class="xl72"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074733#M924007</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2016-04-07T11:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074734#M924008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you expect 10 for April 01? I do get &lt;SPAN style="text-decoration: line-through;"&gt;10 &lt;/SPAN&gt; 12 pallets:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Aisle_Zone&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Aisle_Facturation&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;SD_Close_Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Shop_Ens&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;SD_Dest_Pallet&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025174460&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025174477&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025174484&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025174569&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025224097&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232665&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232672&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232689&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232696&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232771&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232788&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_Overige&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;PBL_OVERIGE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;20160401&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;Pricelist_Hyper&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;554001020025232795&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the expression I am currently using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Sum({$ &amp;lt;[SD_WH] -= {12}, [Aisle_Zone] -= {PBS_Containers, PBS_Displays}&amp;gt; }&lt;/P&gt;&lt;P&gt;aggr(&lt;/P&gt;&lt;P&gt;count({$ &amp;lt;[SD_WH] -= {12}, [Aisle_Zone] -= {PBS_Containers, PBS_Displays}&amp;gt; } &lt;STRONG&gt;DISTINCT [SD_Dest_Pallet]&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;, [$(=GetCurrentField( Aisle ))] ,[$(=GetCurrentField( Enseigne ))], [$(=GetCurrentField(&amp;nbsp; Periods ))]&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074734#M924008</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-07T11:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074735#M924009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah that's because SD_Dest_Pallet 554001020025174460 and 554001020025174569 are already included in&lt;/P&gt;&lt;P&gt;SD_Close_Date 20160331. (a pallet can only be counted once) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074735#M924009</guid>
      <dc:creator>amber2000</dc:creator>
      <dc:date>2016-04-07T11:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct or Count Aggr doesn't return correct values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074736#M924010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should fix this in your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a flag that indicates the first SD_Close_Date for each pallet, which you then can use to filter in your set expression.&lt;/P&gt;&lt;P&gt;You can create a temporary table with min SD_Close_date and the flag field grouped by an appropriate key (maybe just SD_Dest_pallet), then join this flag back to your facts table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also consider modifying your data model so that you get read of your pallets duplicates, which should simplify your aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since we don't know anything about your model or requirement in detail, it's hard to be more specific.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 11:58:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Distinct-or-Count-Aggr-doesn-t-return-correct-values/m-p/1074736#M924010</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-07T11:58:34Z</dc:date>
    </item>
  </channel>
</rss>

