<?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 Use a max date variable in a where clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442054#M803766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have just wasted over half a day on this, hoping someone can help what should so basic I shouldn't even be asking but I cannot make this work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I am trying to do is load one CSV dataset, find the minimum date, then load a second dataset up to that Min Date.&amp;nbsp; End state is to cat them both together.&amp;nbsp;&amp;nbsp; All fields are identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried every variation of brackets and quotes to get the variable to work in the both the Let and the Where clause and it either errors with no error message or simply loads 0 lines from Old_Data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New_Data:&lt;/P&gt;&lt;P&gt;LOAD Date&lt;/P&gt;&lt;P&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1);&lt;/C&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDataCutOff = Min([Date]); &lt;/P&gt;&lt;P&gt;drop table New_Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Old_Data:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1)&lt;/C&gt;&lt;/P&gt;&lt;P&gt;where [Date] &amp;lt; '$(vDataCutOff)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Use a max date variable in a where clause</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442054#M803766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have just wasted over half a day on this, hoping someone can help what should so basic I shouldn't even be asking but I cannot make this work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I am trying to do is load one CSV dataset, find the minimum date, then load a second dataset up to that Min Date.&amp;nbsp; End state is to cat them both together.&amp;nbsp;&amp;nbsp; All fields are identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried every variation of brackets and quotes to get the variable to work in the both the Let and the Where clause and it either errors with no error message or simply loads 0 lines from Old_Data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New_Data:&lt;/P&gt;&lt;P&gt;LOAD Date&lt;/P&gt;&lt;P&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1);&lt;/C&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDataCutOff = Min([Date]); &lt;/P&gt;&lt;P&gt;drop table New_Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Old_Data:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1)&lt;/C&gt;&lt;/P&gt;&lt;P&gt;where [Date] &amp;lt; '$(vDataCutOff)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442054#M803766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use a max date variable in a where clause</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442055#M803767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could be format issue, Can you check same variable in text object with Date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 05:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442055#M803767</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-09T05:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use a max date variable in a where clause</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442056#M803768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bob,&lt;/P&gt;&lt;P&gt;I am not very sure if this should be the issue, but could you please try in the below format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp: &lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;min(Date) as minDate&lt;/P&gt;&lt;P&gt;Resident New_Data; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vDataCutOff= Date(Peek('minDate', 0, 'Temp')); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Temp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 05:56:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442056#M803768</guid>
      <dc:creator>madhumitha</dc:creator>
      <dc:date>2017-11-09T05:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use a max date variable in a where clause</title>
      <link>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442057#M803769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks muchly , Peek worked.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;New_Data:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD date(min([Date])) as minDate&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1);&lt;/C&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let vDataCutOff = Peek('minDate',0,'New'_Data);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table New_Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Old_Data:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &lt;C&gt;(ooxml, embedded labels, table is Sheet1)&lt;/C&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where [Date] &amp;lt; '$(vDataCutOff)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 23:23:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-a-max-date-variable-in-a-where-clause/m-p/1442057#M803769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-09T23:23:24Z</dc:date>
    </item>
  </channel>
</rss>

