<?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: How to use Variable in Where Clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520133#M690286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Max(Week) as MaxWeek&amp;nbsp;&amp;nbsp;&amp;nbsp; // Note&lt;/P&gt;&lt;P&gt;From ABC.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vWeek=Peek('MaxWeek')&amp;nbsp;&amp;nbsp; // Note&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sellout:&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;From XYZ.QVD where Week&amp;lt;= '$(vWeek)';&amp;nbsp;&amp;nbsp; // Note, single quotes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Oct 2013 11:31:46 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2013-10-07T11:31:46Z</dc:date>
    <item>
      <title>How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520132#M690283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help very urgent.&lt;/P&gt;&lt;P&gt;i have a something like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;From ABC.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vWeek=max(Week)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sellout:&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;From XYZ.QVD where Week&amp;lt;=$(vWeek);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i run the above script, it says field not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your help on how to use variable in Where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Venkat T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520132#M690283</guid>
      <dc:creator />
      <dc:date>2013-10-07T11:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520133#M690286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like:&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Max(Week) as MaxWeek&amp;nbsp;&amp;nbsp;&amp;nbsp; // Note&lt;/P&gt;&lt;P&gt;From ABC.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vWeek=Peek('MaxWeek')&amp;nbsp;&amp;nbsp; // Note&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sellout:&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;From XYZ.QVD where Week&amp;lt;= '$(vWeek)';&amp;nbsp;&amp;nbsp; // Note, single quotes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520133#M690286</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-07T11:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520134#M690288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer the following application and excel file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 11:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520134#M690288</guid>
      <dc:creator />
      <dc:date>2013-10-07T11:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520135#M690289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without quotes since vWeek is a number:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... where Week&amp;lt;=$(vWeek);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 12:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520135#M690289</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-10-07T12:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520136#M690290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much, it worked. thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Venkat T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 07:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520136#M690290</guid>
      <dc:creator />
      <dc:date>2013-10-08T07:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520137#M690291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Becher,&lt;/P&gt;&lt;P&gt;Thanks for your input. I have seen that numeric comparison works with and without single quotes while string comparison demands single quotes. Therefore, I usually follow the common one. If you have come across any scenario when single quotes don't work, please let me know, it would enrich my experience.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 05:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520137#M690291</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-09T05:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520138#M690292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how you can be sure in every case that a data comparison works with two different data types? There are a lot of examples where it wont work.. It's easy and secure to use always the right data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 06:29:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520138#M690292</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-10-09T06:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520139#M690293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;What you can do is:&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;ABC:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Week&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABC.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Define a variable :vWeek=max(Week)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load Week resident ABC whereWeek&amp;lt;=$(vWeek);&lt;/P&gt;&lt;P&gt;inner join(Temp)&lt;/P&gt;&lt;P&gt;//Sellout:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From XYZ.QVD ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;' Week ' is present in table ABC and not XYZ,so it s not going to find that field anyway.&lt;/P&gt;&lt;P&gt;Try the above,hope this works.&lt;/P&gt;&lt;P&gt;please let me know its result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rochelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 06:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520139#M690293</guid>
      <dc:creator />
      <dc:date>2013-10-09T06:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520140#M690294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tresesco and Ralf,&lt;/P&gt;&lt;P&gt;Please comment on the above.&lt;/P&gt;&lt;P&gt;Please let me know your suggestions and views on the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks alot,&lt;/P&gt;&lt;P&gt;Rochelle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 06:42:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520140#M690294</guid>
      <dc:creator />
      <dc:date>2013-10-09T06:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520141#M690295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ralf,&lt;/P&gt;&lt;P&gt;It's not that I don't agree. Might be, I am missing something silly. So request you to give a hint of where it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 07:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520141#M690295</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-09T07:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520142#M690296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, this might work mostly in a LOAD Where clause but maybe not in a SQL Select Where clause..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 08:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520142#M690296</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2013-10-09T08:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Variable in Where Clause</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520143#M690297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ralf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 09:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-use-Variable-in-Where-Clause/m-p/520143#M690297</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-10-09T09:19:12Z</dc:date>
    </item>
  </channel>
</rss>

