<?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: Number Sequence in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614275#M1112327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried all above and working fine but need to know whether we can achieve the same result by &lt;/P&gt;&lt;P&gt;For Next Loops .. something like below VB Code...&lt;/P&gt;&lt;P&gt;I know that your above answer is working but I don't want to use &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;AutoGenerate function...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Please don't ask me why as this is the requirement from someone else...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Sub test()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Dim i As Integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;i = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 1 To 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; Debug.Print i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2014 15:28:01 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-03-07T15:28:01Z</dc:date>
    <item>
      <title>Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614272#M1112324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What should be the code to generate ID&lt;/P&gt;&lt;P&gt;1) starting from 1 to 50&lt;/P&gt;&lt;P&gt;2) starting from 1 to 50 only odd numbers&lt;/P&gt;&lt;P&gt;3) starting from 2 to 50 only even numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using loops in QlikView scripts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried using below method and it's working but need to know any For Next Loop...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: blue; font-size: 10.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;RowNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: maroon;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue;"&gt;AutoGenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; 50;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Let vStart= 0;&lt;/P&gt;&lt;P&gt;Let vEnd = 30;&lt;/P&gt;&lt;P&gt;Let vDIFF = $(vEnd) - $(vStart);&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() as ID&lt;/P&gt;&lt;P&gt;AutoGenerate $(vDIFF); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614272#M1112324</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-07T15:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614273#M1112325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you're asking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load RecNo() as ID1,&lt;/P&gt;&lt;P&gt;if(mod(RecNo(),2),RecNo()) as ID2,&lt;/P&gt;&lt;P&gt;if(mod(RecNo(),2),null(),RecNo()) as ID3&lt;/P&gt;&lt;P&gt;AutoGenerate 50;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load RecNo() as Rec, RecNo()*2 as IDeven&lt;/P&gt;&lt;P&gt;AutoGenerate 25;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load RecNo() as Rec, RecNo()*2-1 as IDodd&lt;/P&gt;&lt;P&gt;AutoGenerate 25;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614273#M1112325</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-07T15:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614274#M1112326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vStart= 0;&lt;/P&gt;&lt;P&gt;Let vEnd = 30;&lt;/P&gt;&lt;P&gt;Let vDIFF = $(vEnd) - $(vStart);&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowNo() as ID&lt;/P&gt;&lt;P&gt;WHERE &lt;STRONG&gt;even&lt;/STRONG&gt;(RowNo())&lt;/P&gt;&lt;P&gt;AutoGenerate $(vDIFF); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for even numbers.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;odd&lt;/STRONG&gt;() function for odd numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And with &lt;STRONG&gt;concatenate&lt;/STRONG&gt; ... if you want to add these lines to a previous table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614274#M1112326</guid>
      <dc:creator />
      <dc:date>2014-03-07T15:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614275#M1112327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried all above and working fine but need to know whether we can achieve the same result by &lt;/P&gt;&lt;P&gt;For Next Loops .. something like below VB Code...&lt;/P&gt;&lt;P&gt;I know that your above answer is working but I don't want to use &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;AutoGenerate function...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;Please don't ask me why as this is the requirement from someone else...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Sub test()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Dim i As Integer&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;i = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 1 To 10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; Debug.Print i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next i&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614275#M1112327</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-07T15:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614276#M1112328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update : This one is showing error...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:30:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614276#M1112328</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-07T15:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614277#M1112329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right. This one will work better (I have tested it, hte other not):&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #ff8000; font-size: 10pt;"&gt;&lt;STRONG style="color: #ff8000; font-size: 10pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Data&lt;SPAN style="font-size: 10pt;"&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;LOAD&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;even&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 10pt;"&gt;Load &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;() &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Autogenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; 1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IterNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;()&amp;lt;= &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt;"&gt;$(vDIFF)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;For a=1 to 30 &lt;STRONG&gt;STEP 2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; (your script)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Fabrice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 15:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614277#M1112329</guid>
      <dc:creator />
      <dc:date>2014-03-07T15:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Number Sequence</title>
      <link>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614278#M1112330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one will create a sequence of numbers from Start to End with a given step size:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vStart = -10;&lt;/P&gt;&lt;P&gt;Let vEnd = 10;&lt;/P&gt;&lt;P&gt;Let vStep = 0.1;&lt;/P&gt;&lt;P&gt;Let vDIFF = ($(vEnd) - $(vStart))/$(vStep);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; $(vStart)+(Rowno()-1)*$(vStep) as fieldName,&lt;/P&gt;&lt;P&gt;AutoGenerate $(vDIFF);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get a series of odd or even values, you would set vStep = 2 and make sure the start value is Odd or Even,depending on what you're looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 22:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Number-Sequence/m-p/614278#M1112330</guid>
      <dc:creator />
      <dc:date>2015-11-06T22:33:40Z</dc:date>
    </item>
  </channel>
</rss>

