<?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: Put a variable in the WHERE clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765414#M669214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can you check vtest has a value? After reload you can open variable panel to check the value or in log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe vtest should be:&lt;/P&gt;&lt;P&gt;vtest='XX'&amp;amp; '$(vyear)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Nov 2014 15:44:33 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2014-11-04T15:44:33Z</dc:date>
    <item>
      <title>Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765411#M669211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem with the WHERE clause. &lt;/P&gt;&lt;P&gt;I'd like to filter my data not just with a field name but with a variable.&lt;/P&gt;&lt;P&gt;In particluar i have done a viariable vtest='XX'&amp;amp;($(vyear)+'1'), (where vyear=2015 so vtest=XX2015)&lt;/P&gt;&lt;P&gt;and i want to put this variable in the WHERE like: WHERE(O=$(vtest)); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done something like that with a variable made just with numbers and it works fine, but I can't make this work maybe because the variable is a string.&lt;/P&gt;&lt;P&gt;Any tips? &lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 14:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765411#M669211</guid>
      <dc:creator />
      <dc:date>2014-11-04T14:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765412#M669212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ylenia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vtest is a string it should be betwen ':&lt;/P&gt;&lt;P&gt;WHERE(O='$(vtest)');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 14:30:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765412#M669212</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-04T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765413#M669213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ruben,&lt;/P&gt;&lt;P&gt;With WHERE(O='$(vtest)') it doesen't show any value....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:37:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765413#M669213</guid>
      <dc:creator />
      <dc:date>2014-11-04T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765414#M669214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can you check vtest has a value? After reload you can open variable panel to check the value or in log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe vtest should be:&lt;/P&gt;&lt;P&gt;vtest='XX'&amp;amp; '$(vyear)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765414#M669214</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-04T15:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765415#M669215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes vtest has the right value, vtest=xx2015&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765415#M669215</guid>
      <dc:creator />
      <dc:date>2014-11-04T15:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765416#M669216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, then I don't know, it should work, in log you can check the query executed by script and see if it's ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, try comment the "LET vtest" line and fix the value to test:&lt;/P&gt;&lt;P&gt;LET vtest='XX2015';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:55:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765416#M669216</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-04T15:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765417#M669217</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;You should &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; have any quotes around the $(var) part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vYear=2015;&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 the_table&lt;/P&gt;&lt;P&gt;WHERE (O=$(vYear));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(this works regardles if selecting from sql-database or loading from qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Edit:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you would use strings in your Where statement (and not use variables) you will need to put quotes around the strings,&lt;/P&gt;&lt;P&gt;but that has nothing to do with the use of a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hardcoded:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;..&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;FROM a_table&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;WHERE type='valid'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;and year=2014;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With variables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Let vType='valid';&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Let vYear=2014;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;..&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;..&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;FROM a_table&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;WHERE type='$(vType)'&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;and year=$(vYear);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 15:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765417#M669217</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2014-11-04T15:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765418#M669218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As they pointed before, assuming the content of the variable is a string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To declare the variable:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vtest = 'XXXXXXX'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use in the query:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where [Field] = '$(vtest)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you need to concatenate the variable:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where [Field] = '$(vtest)Restoftheneededstring'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 16:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765418#M669218</guid>
      <dc:creator>alex_millan</dc:creator>
      <dc:date>2014-11-04T16:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765419#M669219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't work!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 17:11:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765419#M669219</guid>
      <dc:creator />
      <dc:date>2014-11-04T17:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765420#M669220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to make sure your variables have the correct value, using the correct Let or Set to declare a variable. Certainly you can use a string in a where statement. Please see attached example. If it is not working and you cannot solve the problem by debugging yourself, then please either make an example demonstrating your problem or attach your dashboard. Could be something more going on (i.e. the functions you use to create variables, the script itself, or other things that can't be predicted).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script I used in case you can't access the dashboard is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set vYear = 2015;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vTest = 'XX' &amp;amp; $(vYear);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group, O, Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, XX2013, 25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, XX2014, 67&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, XX2015, 90&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, XX2016, 46&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where O = '$(vTest)';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 17:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765420#M669220</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-11-04T17:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765421#M669221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremiah,&lt;/P&gt;&lt;P&gt;this is my script, I also tried to use SET instead of LET....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET&amp;nbsp; vyear =fieldValue('Year_PC',1); //read the value from a column label (Year_PC=2014)&lt;/P&gt;&lt;P&gt;LET vtest='XX'&amp;amp;($(vyear)+'1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD A&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AM&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Dati\5_BE.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, no labels, header is 7 lines, table is foglio1)&lt;/P&gt;&lt;P&gt;WHERE(O='$(vtest)'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also used the function MsgBox to read the variable and It reads correctly XX2015...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765421#M669221</guid>
      <dc:creator />
      <dc:date>2014-11-06T16:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765422#M669222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;As LET evaluates and SET gets a literal, I'd try this way:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET&amp;nbsp; vyear =fieldValue('Year_PC',1) + 1;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET vtest='XX' &amp;amp; '($(vyear))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD A&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&amp;nbsp; ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AM &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dati\5_BE.xlsx&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(ooxml, no labels, header is 7 lines, table is foglio1)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE O='$(vtest)';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope that works,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765422#M669222</guid>
      <dc:creator>alex_millan</dc:creator>
      <dc:date>2014-11-06T16:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765423#M669223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try first to assure is an variable issue, check if works hardcoding 'XX2015', if not maybe there is an extra blank space in excel or another thing that makes the where clause false&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD A&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AM&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Dati\5_BE.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, no labels, header is 7 lines, table is foglio1)&lt;/P&gt;&lt;P&gt;WHERE(O='XX2015'); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765423#M669223</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-06T16:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765424#M669224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no...it's the same!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765424#M669224</guid>
      <dc:creator />
      <dc:date>2014-11-06T16:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765425#M669225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, It's a variable issue because with WHERE(O='XX2015') the script works...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765425#M669225</guid>
      <dc:creator />
      <dc:date>2014-11-06T16:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765426#M669226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, try to debug it as Ruben point out, or if possible, send a sample, that would be most helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 16:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765426#M669226</guid>
      <dc:creator>alex_millan</dc:creator>
      <dc:date>2014-11-06T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765427#M669227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made an easy sample and it works, check where you have the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 17:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765427#M669227</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2014-11-06T17:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Put a variable in the WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765428#M669228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm this worked fine for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year_PC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2015&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET&amp;nbsp; vyear =fieldValue('Year_PC',1); //read the value from a column label (Year_PC=2014)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vtest='XX'&amp;amp;($(vyear)+'1');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD A&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; O&amp;nbsp;&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&amp;nbsp; ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AM &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\Users\kurpatj\Desktop\Dati\5_BE.xlsx&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, no labels, header is 7 lines, table is foglio1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE(O= '$(vtest)');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds like it's probably your data at this point. Check your excel file and make sure the values don't have spaces, extra characters, and the capitilization is right (i.e. make sure its exactly XX2015 and not xx2015, xx 2015, XX 2015, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Just saw it worked with 'XX2015' hard-coded so you can ignore what I said about your data in the excel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 17:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Put-a-variable-in-the-WHERE-clause/m-p/765428#M669228</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-11-06T17:09:50Z</dc:date>
    </item>
  </channel>
</rss>

