<?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 in Qlikview script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692346#M726089</link>
    <description>&lt;P&gt;Got it, try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD * INLINE [
    SNO, Material, SubMaterial, Serial, Time
    1, Plastic, Refill, 101867, 8
    2, Plastic, Refill, 101867, 3
    3, Plastic, Refill, 187650, 4
    4, Rubber, Thick, 162907, 5
];

Left Join (Table)
LOAD Material,
	 SubMaterial,
	 Count(DISTINCT Serial) as Count
Resident Table
Group By Material, SubMaterial;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 312px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31574i0B3CCC96DB9E1E6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2020 12:31:05 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-04-09T12:31:05Z</dc:date>
    <item>
      <title>Count in Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692310#M726086</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am severely facing issue on getting count in qlikview script&lt;/P&gt;&lt;P&gt;Please find data below&lt;/P&gt;&lt;P&gt;SNO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Material&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SubMaterial&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Refill&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 101867&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Refill&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 101867&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Refill&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;187650&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rubber&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thick&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 162907&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Required out put&lt;/P&gt;&lt;P&gt;SNO&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Material&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SubMaterial&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Serial&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Count&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Refill&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 101867&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Refill&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 101867&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Plastic&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Refill&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;187650&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rubber&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Thick&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 162907&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here in the above Material, Submaterial,Serial&amp;nbsp; are same and time should **bleep** once in the SNO 1 and 2&lt;/P&gt;&lt;P&gt;and in SNO 3&amp;nbsp; &amp;nbsp;again&amp;nbsp; Material,Submaterial are same and serial is different then it should count 1&lt;/P&gt;&lt;P&gt;Ie., if Material,SubMaterial are same it should count&amp;nbsp; only Serial.&lt;/P&gt;&lt;P&gt;Please help me in this as it is urgent.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692310#M726086</guid>
      <dc:creator>djaykumar</dc:creator>
      <dc:date>2024-11-16T18:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count in Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692338#M726087</link>
      <description>&lt;P&gt;How are you getting a count of 2 for row number 3? Do you mean to get 1?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 12:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692338#M726087</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-09T12:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count in Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692342#M726088</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;No, count for row number 3 is 2 only for both row number 1 and 2 count will take 1 + row number 3 count will take 1&amp;nbsp;&lt;/P&gt;&lt;P&gt;because it should count unique Serial.&lt;/P&gt;&lt;P&gt;Please help me in this&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 12:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692342#M726088</guid>
      <dc:creator>djaykumar</dc:creator>
      <dc:date>2020-04-09T12:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count in Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692346#M726089</link>
      <description>&lt;P&gt;Got it, try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD * INLINE [
    SNO, Material, SubMaterial, Serial, Time
    1, Plastic, Refill, 101867, 8
    2, Plastic, Refill, 101867, 3
    3, Plastic, Refill, 187650, 4
    4, Rubber, Thick, 162907, 5
];

Left Join (Table)
LOAD Material,
	 SubMaterial,
	 Count(DISTINCT Serial) as Count
Resident Table
Group By Material, SubMaterial;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 312px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/31574i0B3CCC96DB9E1E6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 12:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1692346#M726089</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-04-09T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Count in Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1694865#M726090</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Its working&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 10:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-in-Qlikview-script/m-p/1694865#M726090</guid>
      <dc:creator>djaykumar</dc:creator>
      <dc:date>2020-04-20T10:40:54Z</dc:date>
    </item>
  </channel>
</rss>

