<?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: Create a QVD column with a 4-digit number sequence in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112572#M7735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob, great answer.&lt;/P&gt;&lt;P&gt;Besides this particular question, there is a way of using similar approach with incremental loads?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2018 12:56:34 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2018-11-07T12:56:34Z</dc:date>
    <item>
      <title>Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112568#M7731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt;Create a QVD column with a 4-digit number sequence&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN lang="en"&gt;Good afternoon,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt;I'm having a problem, I'm not able to create a column on qvd with sequential 4 digit numbers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt;Example: Sequential column "0001", "0002" and so on, but I need to put an IF in another column if the CNPJ is the same, the sequence number also needs to be the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;SPAN style="color: black;"&gt;Could someone help me with this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 18:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112568#M7731</guid>
      <dc:creator>triersistemas</dc:creator>
      <dc:date>2018-11-06T18:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112569#M7732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the following is helpful: &lt;A href="https://community.qlik.com/qlik-blogpost/3292"&gt;Counters in the Load&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 09:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112569#M7732</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-11-07T09:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112570#M7733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, with "Text(Num(RowNo(), '0000'))" you can create the codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need a mapping table using the CNPJ to reuse assigned codes, and applymap (or join) to the data table to add the codes, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;setCodes:&lt;/P&gt;&lt;P&gt;LOAD CNPJ as chkCNPJ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Text(Num(RowNo(), '0000')) as Code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident tempDataTable where not exists(&lt;SPAN style="font-size: 13.3333px;"&gt;chkCNPJ, &lt;SPAN style="font-size: 13.3333px;"&gt;CNPJ);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;mapCodes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Mapping LOAD * resident setCodes;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DROP Table setCodes;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Data:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD &lt;EM&gt;Fields&lt;/EM&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; applymap('mapCodes', &lt;SPAN style="font-size: 13.3333px;"&gt;CNPJ&lt;/SPAN&gt;) as Code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;tempDataTable&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DROP &lt;SPAN style="font-size: 13.3333px;"&gt;tempDataTable&lt;/SPAN&gt; ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112570#M7733</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-11-07T12:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112571#M7734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Num(AutoNumber(&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;CNPJ),'0000') as Sequence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112571#M7734</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-11-07T12:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112572#M7735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob, great answer.&lt;/P&gt;&lt;P&gt;Besides this particular question, there is a way of using similar approach with incremental loads?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 12:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112572#M7735</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-11-07T12:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create a QVD column with a 4-digit number sequence</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112573#M7736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben, Yes it possible. But because AutoNumber() values are only consistent within a reload, you have to "prime" the autonumber pool by reprocessing the QVD values first, in sequence of autonumber. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp1:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT &lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;CNPJ, Sequence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;FROM the.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Temp2:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;LOAD AutoNumber(CNJP) as Sequence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;RESIDENT Temp1 ORDER By Sequence;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;DROP TABLES Temp1, Temp2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;// You can now safely load and autonumber the new rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.easyqlik.com" rel="nofollow" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2018 23:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-QVD-column-with-a-4-digit-number-sequence/m-p/112573#M7736</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-11-07T23:09:53Z</dc:date>
    </item>
  </channel>
</rss>

