<?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 create a ID_COUNT field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282364#M104969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, if you sorted the data as it was loaded by the address field you could use the following to check if the new record was the same as the one before, if it is different then 1 otherwise 0? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(address = peek(address),0,1) as ad_id_count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2011 14:01:38 GMT</pubDate>
    <dc:creator>sbaldwin</dc:creator>
    <dc:date>2011-08-18T14:01:38Z</dc:date>
    <item>
      <title>How to create a ID_COUNT field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282363#M104968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with sales per adress&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need a count field wich is 1 for every distinct adress.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must replace the count (distinct ad_id) with sum (ad_id_count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is the peek statement to create this field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 13:41:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282363#M104968</guid>
      <dc:creator>btrompetter</dc:creator>
      <dc:date>2011-08-18T13:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a ID_COUNT field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282364#M104969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, if you sorted the data as it was loaded by the address field you could use the following to check if the new record was the same as the one before, if it is different then 1 otherwise 0? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(address = peek(address),0,1) as ad_id_count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 14:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282364#M104969</guid>
      <dc:creator>sbaldwin</dc:creator>
      <dc:date>2011-08-18T14:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a ID_COUNT field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282365#M104970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have to deal with 150 million records.Is there another way to create such field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What about a sepreate table with only the AD_ID and a count_filed, did this have the same effect? Or Is a count(DISTINCT) faster?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 07:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-ID-COUNT-field/m-p/282365#M104970</guid>
      <dc:creator>btrompetter</dc:creator>
      <dc:date>2011-08-19T07:35:22Z</dc:date>
    </item>
  </channel>
</rss>

