<?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: Why i can't count in a variable in the load script? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423678#M429124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess this functionality is not directly available, but if you want, you can calculate Count() in a table load and then store its value in a variable using Peek() function....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD c&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ount(distinct usercode) as CountCust&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident SomeTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vCountCustomers = Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CountCust');&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;DROP Table Temp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Oct 2017 10:12:22 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-10-10T10:12:22Z</dc:date>
    <item>
      <title>Why i can't count in a variable in the load script?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423676#M429122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have the following code in the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vCountCustomers=count(distinct usercode);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as result i get nothing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423676#M429122</guid>
      <dc:creator>qlikconsultant</dc:creator>
      <dc:date>2017-10-10T10:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why i can't count in a variable in the load script?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423677#M429123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it with: LET vCountCustomers = fieldvaluecount('usercode')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423677#M429123</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-10-10T10:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why i can't count in a variable in the load script?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423678#M429124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess this functionality is not directly available, but if you want, you can calculate Count() in a table load and then store its value in a variable using Peek() function....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD c&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ount(distinct usercode) as CountCust&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident SomeTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vCountCustomers = Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CountCust');&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;DROP Table Temp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423678#M429124</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-10T10:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why i can't count in a variable in the load script?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423679#M429125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed. In a Load Script, aggregation functions like Sum(), Count() Min(), Max() and the others only work if they are used in a LOAD or SQL SELECT statement. &lt;SPAN style="font-size: 10pt;"&gt;AFAIK they don't even work on Fields, just on Table Columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 10:28:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-i-can-t-count-in-a-variable-in-the-load-script/m-p/1423679#M429125</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-10-10T10:28:14Z</dc:date>
    </item>
  </channel>
</rss>

