<?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 Issue with do/loop and date field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-do-loop-and-date-field/m-p/426742#M1158821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a beginner so this is something very simple ,but i cannot think of a way to do it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So. Let me explain what problem i have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an excel document that have the following rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 362px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="78"&gt;DATA&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="284"&gt;CatClient&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/5/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;dune inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/18/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;salso inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/17/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;babmoo inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/21/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;alcor ltrd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/19/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;sumo ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/26/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;elmo ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;dreasos ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;G&amp;amp;Galtor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/30/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;LIPEST COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/21/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;MACSL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;NXCO DISTRL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;10/11/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;OFFIL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/5/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;PROSA COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/22/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;PRMLAC COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/20/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;SERSCOM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;10/25/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;TERCT COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/12/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;COMBI COMIMPEX SRL -COM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my qlikview script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xcel:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowno() as row,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CatClient&lt;/P&gt;&lt;P&gt;FROM c:\!\data.xls (biff, embedded labels, table is [Sheet1$]);&amp;nbsp; (,&amp;lt;- this is the excel above)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let RO = peek('Rand');&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;let cat = fieldvalue('CatClient',$(RO));&lt;/P&gt;&lt;P&gt;let dta&amp;nbsp; = fieldvalue('DATA',$(RO));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Base:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CodProd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tip,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pice,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qty,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CateClienti&lt;/P&gt;&lt;P&gt;FROM c:\!\Base.qvd (qvd) where CateClienti = '$(cat)' and DATA &amp;gt;= '$(dta)' ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let RO = RO - 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop while $(RO) &amp;gt; 0&lt;/P&gt;&lt;P&gt;drop table xcel;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the clients that have same dates (it only works for the firs one). I'm talking about the ones from the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:8/31/2012&amp;nbsp; dreasos ltd&amp;nbsp; (it takes in consideration (where CateClienti = '$(cat)' and DATA &amp;gt;= '$(dta)' ';)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for the rest G&amp;amp;Galtor and NXCO DISTRL COM (takes in consideration only CateClienti = '$(cat)' but not the date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issues is clearly with the dates being the same. But i cannot understand why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i explain my issues to your understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking time to read my post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours &lt;/P&gt;&lt;P&gt;mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2012 15:10:22 GMT</pubDate>
    <dc:creator>markthepig</dc:creator>
    <dc:date>2012-12-11T15:10:22Z</dc:date>
    <item>
      <title>Issue with do/loop and date field</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-do-loop-and-date-field/m-p/426742#M1158821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a beginner so this is something very simple ,but i cannot think of a way to do it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So. Let me explain what problem i have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an excel document that have the following rows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 362px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="78"&gt;DATA&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="284"&gt;CatClient&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/5/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;dune inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/18/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;salso inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/17/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;babmoo inc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/21/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;alcor ltrd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/19/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;sumo ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/26/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;elmo ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;dreasos ltd&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;G&amp;amp;Galtor&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/30/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;LIPEST COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/21/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;MACSL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;8/31/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;NXCO DISTRL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;10/11/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;OFFIL COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/5/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;PROSA COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;9/22/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;PRMLAC COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/20/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;SERSCOM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl68" height="17" style="border-top: none;"&gt;10/25/2012&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;TERCT COM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="17" style="border-top: none;"&gt;9/12/2012&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;COMBI COMIMPEX SRL -COM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my qlikview script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xcel:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowno() as row,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CatClient&lt;/P&gt;&lt;P&gt;FROM c:\!\data.xls (biff, embedded labels, table is [Sheet1$]);&amp;nbsp; (,&amp;lt;- this is the excel above)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let RO = peek('Rand');&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;let cat = fieldvalue('CatClient',$(RO));&lt;/P&gt;&lt;P&gt;let dta&amp;nbsp; = fieldvalue('DATA',$(RO));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Base:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CodProd,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tip,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pice,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qty,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CateClienti&lt;/P&gt;&lt;P&gt;FROM c:\!\Base.qvd (qvd) where CateClienti = '$(cat)' and DATA &amp;gt;= '$(dta)' ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let RO = RO - 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop while $(RO) &amp;gt; 0&lt;/P&gt;&lt;P&gt;drop table xcel;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the clients that have same dates (it only works for the firs one). I'm talking about the ones from the excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:8/31/2012&amp;nbsp; dreasos ltd&amp;nbsp; (it takes in consideration (where CateClienti = '$(cat)' and DATA &amp;gt;= '$(dta)' ';)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for the rest G&amp;amp;Galtor and NXCO DISTRL COM (takes in consideration only CateClienti = '$(cat)' but not the date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issues is clearly with the dates being the same. But i cannot understand why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i explain my issues to your understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for taking time to read my post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours &lt;/P&gt;&lt;P&gt;mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 15:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-do-loop-and-date-field/m-p/426742#M1158821</guid>
      <dc:creator>markthepig</dc:creator>
      <dc:date>2012-12-11T15:10:22Z</dc:date>
    </item>
  </channel>
</rss>

