<?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 Creating a numeric key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203207#M60634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Upendra ,&lt;/P&gt;&lt;P&gt;I tried your if condition but getting wrong value. Please correct where it is going wrong&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt; [Invoice No]&lt;B&gt;,&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CostingCode,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(peek(CostingCode)=0,peek(Numerator),Numerator) as Numerator&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM &lt;C&gt; (ooxml, embedded labels, table is Sheet1) order by [Invoice No],CostingCode asc&lt;/C&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Attached the o/p for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Apr 2011 12:56:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-07T12:56:17Z</dc:date>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203202#M60629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys.&lt;/P&gt;&lt;P&gt;I have the following table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" dir="rtl"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;Numerator&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;CostingCode&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;Invoice No&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;6&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now I want that if the CostingCode=0 then the numerator will not appear and the next one will continue from where is stopped.&lt;/P&gt;&lt;P&gt;Now the table will look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" dir="rtl"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;Numerator&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;CostingCode&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;Invoice No&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;-&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;-&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD valign="top" width="189"&gt;&lt;P dir="ltr"&gt;AAAA-111&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;How can I do it in the script? (I have to do it &lt;STRONG&gt;for&lt;/STRONG&gt; &lt;STRONG&gt;every invoice&lt;/STRONG&gt;...)&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;P&gt;Montal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:03:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203202#M60629</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:03:05Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203203#M60630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Montal,&lt;/P&gt;&lt;P&gt;Try this if (CostingCode=0,' -' , Numerator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:09:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203203#M60630</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:09:28Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203204#M60631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi XXX.&lt;/P&gt;&lt;P&gt;But then the last Numertaor will be 6 and it needs to be 4...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203204#M60631</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:15:20Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203205#M60632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How you are genrating the numerator, it is database value of generated at script level using recno ,row no() functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:38:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203205#M60632</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:38:57Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203206#M60633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Sort the table by Invoice No &amp;amp; Numerator then use below if statment&lt;/P&gt;&lt;P&gt;if(peek(CostingCode)=0,peek(Numerator),Numerator)&lt;/P&gt;&lt;P&gt;Hope this will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203206#M60633</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:40:37Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203207#M60634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Upendra ,&lt;/P&gt;&lt;P&gt;I tried your if condition but getting wrong value. Please correct where it is going wrong&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt; [Invoice No]&lt;B&gt;,&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CostingCode,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(peek(CostingCode)=0,peek(Numerator),Numerator) as Numerator&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM &lt;C&gt; (ooxml, embedded labels, table is Sheet1) order by [Invoice No],CostingCode asc&lt;/C&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Attached the o/p for your reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 12:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203207#M60634</guid>
      <dc:creator />
      <dc:date>2011-04-07T12:56:17Z</dc:date>
    </item>
    <item>
      <title>Creating a numeric key</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203208#M60635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;apply the peek() function in a resident load AFTER the initial load. Sort the table in your initial load.&lt;/P&gt;&lt;P&gt;Also, include a statement like if(peek('invoice')=invoice),.....) because you need to restart if a new invoice appears.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 13:10:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-numeric-key/m-p/203208#M60635</guid>
      <dc:creator>tabletuner</dc:creator>
      <dc:date>2011-04-07T13:10:45Z</dc:date>
    </item>
  </channel>
</rss>

