<?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 Function in Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910656#M653795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temp:&lt;BR /&gt;Load D1,D2,D3,D4, D1&amp;amp;D2 as New1 From TableName;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left Join (Temp)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load D1, D2, D3, D4, New1, Count( D2) as TotalD2 Resident Temp&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Group By &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;D1, D2, D3, D4, New1&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Its showing the wrong data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jul 2015 19:23:43 GMT</pubDate>
    <dc:creator>markgraham123</dc:creator>
    <dc:date>2015-07-22T19:23:43Z</dc:date>
    <item>
      <title>Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910649#M653787</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;I have a table where fields were as follows:&lt;/P&gt;&lt;P&gt;temp1:&lt;/P&gt;&lt;P&gt;Load D1, D2, D3, D4, D5...D10 &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;from table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanna perform count(D2) in script.&lt;/P&gt;&lt;P&gt;So, the script should be like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp2:&lt;/P&gt;&lt;P&gt;Load D1, D2, Count(D2), D3, D4, D5 from table Group by D1, D2 D3, D4, D5..D10&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, Can i follow the approach...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;temp1:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Load D1, D2, D3, D4, D5..D10 &lt;SPAN style="font-size: 10pt;"&gt;from table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;join&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Load D2, Count(D2) from table Group by D2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 18:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910649#M653787</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-07-22T18:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910650#M653788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can but the result would be different... For 2nd approach the group by will only with D2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 18:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910650#M653788</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-07-22T18:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910651#M653789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANy idea how can i approach to get count() for D2 through script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 18:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910651#M653789</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-07-22T18:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910652#M653790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just want to add TotalD2Count then you can follow as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Load D1,D2,D3,D4 From TableName;&lt;/P&gt;&lt;P&gt;Left Join (Temp)&lt;/P&gt;&lt;P&gt;Load Count(Distinct D2) as TotalD2 Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Count(D2) if you don't want Distinct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you want D2 with respect to D2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join(Temp)&lt;/P&gt;&lt;P&gt;Load D1, Count(D2) Resident Temp Group By D1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add D3, D4, D5 similar manner but need to add them also in Group By&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 18:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910652#M653790</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-07-22T18:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910653#M653791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/93661_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;you can, but the result of the count depends on group by fields (see image)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;zz:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load rowno() as id, * inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;d1,d2,d3,d4,d5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1,1,1,1,1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2,2,2,2,2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3,3,3,3,3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4,4,4,4,4&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1,1,1,1,1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;11,1,11,11,11&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;11,1,11,11,11&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (zz) load d2, count(d2) as countd2 resident zz group by d2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (zz) load d1,d2,d3,d4,d5, count(d2) as count2d2 resident zz group by d1,d2,d3,d4,d5;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 18:45:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910653#M653791</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-22T18:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910654#M653792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small question here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If in the table ZZ, i'm doing D2&amp;amp;D3 as D2D3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do i have to use "D2D3" in group By?????&lt;/P&gt;&lt;P&gt;Else just D1, D2, D3, D4, D5?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 19:00:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910654#M653792</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-07-22T19:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910655#M653793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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; group by D2D3&lt;/P&gt;&lt;P&gt;is the same as&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by D2, D3&lt;/P&gt;&lt;P&gt;is not the same as group by D1, D2, D3, D4, D5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 19:07:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910655#M653793</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-22T19:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count Function in Script</title>
      <link>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910656#M653795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Massimo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temp:&lt;BR /&gt;Load D1,D2,D3,D4, D1&amp;amp;D2 as New1 From TableName;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Left Join (Temp)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load D1, D2, D3, D4, New1, Count( D2) as TotalD2 Resident Temp&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Group By &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;D1, D2, D3, D4, New1&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Its showing the wrong data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2015 19:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-Function-in-Script/m-p/910656#M653795</guid>
      <dc:creator>markgraham123</dc:creator>
      <dc:date>2015-07-22T19:23:43Z</dc:date>
    </item>
  </channel>
</rss>

