<?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: How to count distinct while having to use a SUM in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36746#M6188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have more than one dimension in your chart or just Container No.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 13:45:46 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-05-16T13:45:46Z</dc:date>
    <item>
      <title>How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36741#M6183</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 am building a KPI and I have created this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt;[MonthID1]={$(cCurrMonthID)},[Inbound Type]={'FULL CONTAINER LOAD'}&amp;gt;}TEU) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works but I have mutliple lines for the same container in my raw data and I need to sum the TEU for only one container at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i integrate Count( distinct( to my expression ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am summing the numeric values in the filed &lt;SPAN style="font-size: 13.3333px;"&gt;TEU but I need to it only once per container ref from the field &lt;/SPAN&gt; [Container No.].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 15:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36741#M6183</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-15T15:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36742#M6184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(&lt;STRONG&gt;{$&amp;lt;[MonthID1] = {$(cCurrMonthID)}, [Inbound Type] = {'FULL CONTAINER LOAD'}&amp;gt;} &lt;/STRONG&gt;Aggr(Sum(DISTINCT {$&amp;lt;[MonthID1] = {$(cCurrMonthID)}, [Inbound Type] = {'FULL CONTAINER LOAD'}&amp;gt;}TEU), Container))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 15:49:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36742#M6184</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-15T15:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36743#M6185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;It did not work. It showed 0 instead of a figure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 13:15:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36743#M6185</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-16T13:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36744#M6186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample to see the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 13:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36744#M6186</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-16T13:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36745#M6187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is it is my customer's data so i can't really share it&lt;/P&gt;&lt;P&gt;but basically in my raw data, there are multiple lines for each container&lt;/P&gt;&lt;P&gt;but i calculate the number of teu per container.&lt;/P&gt;&lt;P&gt;So for now, if there are 3 lines for a contiainer, it adding all 3 lines in the total sum rather adding just one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;RAW DATA&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="259"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" width="93"&gt;Container No.&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="102"&gt;Container Size&lt;/TD&gt;&lt;TD class="xl69" style="border-left: none;" width="64"&gt;TEU&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: none;" width="93"&gt;APHU6932662&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;" width="102"&gt;40ft&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;" width="64"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="border-top: none;" width="93"&gt;APHU6932662&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none; border-left: none;" width="102"&gt;40ft&lt;/TD&gt;&lt;TD class="xl71" style="border-top: none; border-left: none;" width="64"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="border-top: none;" width="93"&gt;APZU4790601&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;" width="102"&gt;40ft&lt;/TD&gt;&lt;TD class="xl73" style="border-top: none; border-left: none;" width="64"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="20" style="border-top: none;" width="93"&gt;APZU4790601&lt;/TD&gt;&lt;TD class="xl72" style="border-top: none; border-left: none;" width="102"&gt;40ft&lt;/TD&gt;&lt;TD class="xl73" style="border-top: none; border-left: none;" width="64"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl74" height="20" style="border-top: none;" width="93"&gt;TEMU3683930&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none; border-left: none;" width="102"&gt;20ft&lt;/TD&gt;&lt;TD class="xl75" style="border-top: none; border-left: none;" width="64"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl74" height="20" style="border-top: none;" width="93"&gt;TEMU3683930&lt;/TD&gt;&lt;TD class="xl74" style="border-top: none; border-left: none;" width="102"&gt;20ft&lt;/TD&gt;&lt;TD class="xl75" style="border-top: none; border-left: none;" width="64"&gt;1&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;&lt;/P&gt;&lt;P&gt;pivots:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What i get now&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; what i need to get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="385"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="147"&gt;APHU6932662&lt;/TD&gt;&lt;TD align="right" width="131"&gt;4&lt;/TD&gt;&lt;TD align="right" width="107"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;APZU4790601&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;TEMU3683930&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD align="right"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that helping ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 13:34:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36745#M6187</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-16T13:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36746#M6188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have more than one dimension in your chart or just Container No.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 13:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36746#M6188</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-16T13:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36747#M6189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IN THE CHART I DON'T HAVE ANY DIMENTIONS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:27:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36747#M6189</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-16T14:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36748#M6190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See my pivot table: I only use Expressions ( in expression: a variable)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202569_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture 2.JPG" class="jive-image image-2" src="/legacyfs/online/202570_Capture 2.JPG" style="height: 235px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36748#M6190</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-16T14:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36749#M6191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure... I think from what you initially provided... this should have worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;{$&amp;lt;[MonthID1] = {$(cCurrMonthID)}, [Inbound Type] = {'FULL CONTAINER LOAD'}&amp;gt;} &lt;/STRONG&gt;Aggr(Sum(DISTINCT {$&amp;lt;[MonthID1] = {$(cCurrMonthID)}, [Inbound Type] = {'FULL CONTAINER LOAD'}&amp;gt;}TEU), Container))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if it did not... then I am not sure... may be if you can share a qvw sample... I might be able to take a look... otherwise I hope someone else can offer there help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36749#M6191</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-16T14:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to count distinct while having to use a SUM</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36750#M6192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny&lt;/P&gt;&lt;P&gt;I have to be careful about what I share I am getting someone else to look at it in my company &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I appreciate the time you gave to my query &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-count-distinct-while-having-to-use-a-SUM/m-p/36750#M6192</guid>
      <dc:creator>maudifer</dc:creator>
      <dc:date>2018-05-16T14:42:51Z</dc:date>
    </item>
  </channel>
</rss>

