<?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 Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535772#M200207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys! With Aggr() I did my purpose!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Oct 2013 14:57:44 GMT</pubDate>
    <dc:creator>marcel_olmo</dc:creator>
    <dc:date>2013-10-28T14:57:44Z</dc:date>
    <item>
      <title>Count distinct Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535769#M200204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, I have a table of movements that describes a state of a code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code could be returned, and when is returned, it can be returned as "return", "qreturn" or "freturn".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to count how many codes of each type of returned code I have in my document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know why it counts in a weird way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;This is what I get :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="240"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="80"&gt;Mov&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="80"&gt;Mov Detail&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="80"&gt;Counter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="80" rowspan="4" style="border-bottom: .5pt solid silver; border-top: none;" width="80"&gt;lending&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;" width="80"&gt;freturn&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="80"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none; border-left: none;" width="80"&gt;qreturn&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="80"&gt;203&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none; border-left: none;" width="80"&gt;return&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="80"&gt;320&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: none; border-left: none;" width="80"&gt;Total &lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="80"&gt;411&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: none;" width="80"&gt;Total &lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;" width="80"&gt; &lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="80"&gt;411&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;And this is my desired result (if I count properly) :&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="240"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="80"&gt;Mov&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="80"&gt;Mov Detail&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="80"&gt;Counter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="80" rowspan="4" style="border-bottom: .5pt solid silver; border-top: none;" width="80"&gt;lending&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;" width="80"&gt;freturn&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="80"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: none; border-left: none;" width="80"&gt;qreturn&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="80"&gt;203&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="border-top: none; border-left: none;" width="80"&gt;return&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="80"&gt;320&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: none; border-left: none;" width="80"&gt;Total &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;" width="80"&gt;524&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="border-top: none;" width="80"&gt;Total &lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;" width="80"&gt; &lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;" width="80"&gt;524&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I attach my test in Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how is this happening? What I'm doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535769#M200204</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2013-10-28T14:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535770#M200205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because your Code you count may relate to several Mov Detail values for the same Mov value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=sum(aggr( count(distinct {$&amp;lt; Returned ={'1'} &amp;gt;} Code ) , Mov, [Mov Detail]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to do a sum-of-rows total in your pivot table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:49:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535770#M200205</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-10-28T14:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535771#M200206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; maybe I don't understand.&lt;/P&gt;&lt;P&gt;For example for code 9788401339080 you have both qreturn and return as [Mov Detail].&lt;/P&gt;&lt;P&gt;So this code is counted once in the total, and it is right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535771#M200206</guid>
      <dc:creator>bbi_mba_76</dc:creator>
      <dc:date>2013-10-28T14:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535772#M200207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys! With Aggr() I did my purpose!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535772#M200207</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2013-10-28T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count distinct Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535773#M200208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the attachment, its working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 15:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-distinct-Problem/m-p/535773#M200208</guid>
      <dc:creator>israrkhan</dc:creator>
      <dc:date>2013-10-28T15:04:56Z</dc:date>
    </item>
  </channel>
</rss>

