<?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: Need logic help for populating rowno for each set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043889#M351096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share how the expected output for this sample data is going to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Apr 2016 06:08:55 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-04-29T06:08:55Z</dc:date>
    <item>
      <title>Need logic help for populating rowno for each set</title>
      <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043888#M351095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a CallID, SegID, Store information in tables and below fields are derived in SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Order] = ROW_NUMBER() OVER (PARTITION BY CallID ORDER BY SegID)&lt;/P&gt;&lt;P&gt;[StoreOrder] = ROW_NUMBER() OVER (PARTITION BY CallID,Store ORDER BY SegID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the sample data...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 260px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" width="42"&gt;CallID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="42"&gt;SegID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="39"&gt;Store&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="52"&gt;[Order]&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="85"&gt;[StoreOrder]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="19" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="19" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="19" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="19" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="19" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;8&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="19" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;13&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;14&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="19" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;15&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help how can we derive these two fields in QlikView?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we need to use Rowno() and peek function? or...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043888#M351095</guid>
      <dc:creator>sridhar_sigired</dc:creator>
      <dc:date>2016-04-29T04:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic help for populating rowno for each set</title>
      <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043889#M351096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share how the expected output for this sample data is going to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043889#M351096</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-29T06:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic help for populating rowno for each set</title>
      <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043890#M351097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD CallID,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SegID,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Store&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;FROM Table;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;New:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;noconcatenate&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(rowno()=1 or &lt;SPAN style="font-size: 13.3333px;"&gt;CallID&amp;lt;&amp;gt;previous(&lt;SPAN style="font-size: 13.3333px;"&gt;CallID&lt;/SPAN&gt;),1,peek('Order')+1) as &lt;SPAN style="font-size: 13.3333px;"&gt;Order,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;SPAN style="font-size: 13.3333px;"&gt;rowno()=1 or &lt;SPAN style="font-size: 13.3333px;"&gt;Store&amp;lt;&amp;gt;previous(&lt;SPAN style="font-size: 13.3333px;"&gt;Store),1,&lt;SPAN style="font-size: 13.3333px;"&gt;peek('StoreOrder')+1) as &lt;SPAN style="font-size: 13.3333px;"&gt;StoreOrder&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style=": ; font-size: 13.3333px;"&gt;Resident Data&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;order by &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;CallID,&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;SegID;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style="line-height: 1.5em; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 1.5em; font-size: 13.3333px;"&gt;&lt;EM&gt;Drop table Data;&lt;/EM&gt;&lt;BR /&gt;&lt;/STRONG&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043890#M351097</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-04-29T06:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic help for populating rowno for each set</title>
      <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043891#M351098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have below 3 columns in my app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CallID,&lt;/P&gt;&lt;P&gt;SegID,&lt;/P&gt;&lt;P&gt;Store&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using those 3, i need to derive Order, StoreOrder... Unfortunately i cannot able to share the app due to sensitive data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043891#M351098</guid>
      <dc:creator>sridhar_sigired</dc:creator>
      <dc:date>2016-04-29T06:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need logic help for populating rowno for each set</title>
      <link>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043892#M351099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not asking you to share your app, just asking how are those two new columns going to look like for the data you provided above &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-logic-help-for-populating-rowno-for-each-set/m-p/1043892#M351099</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-04-29T06:36:36Z</dc:date>
    </item>
  </channel>
</rss>

