<?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: where Years = Year(Now()) fail in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291910#M858889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But this will only give me the 2016 values. I need it to be the 2017 values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Jan 2017 11:01:04 GMT</pubDate>
    <dc:creator>sfloberg</dc:creator>
    <dc:date>2017-01-22T11:01:04Z</dc:date>
    <item>
      <title>where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291908#M858887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table who looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Days, Years&lt;BR /&gt;1, 2015&lt;/P&gt;&lt;P&gt;2, 2015&lt;/P&gt;&lt;P&gt;3, 2015&lt;/P&gt;&lt;P&gt;4, 2016&lt;/P&gt;&lt;P&gt;5, 2016&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;where &lt;SPAN style="font-size: 13.3333px;"&gt;Years&lt;/SPAN&gt; = Year(Now());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The loading of the script fill fail because 2017 isn't in the inline. How can I make the script not fail even if the year &lt;SPAN style="font-size: 13.3333px;"&gt;isn't&lt;/SPAN&gt; in the inline yet?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When I try&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;: where &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Years&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; = Max(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Years&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;);. the script fails too by giving me: Unknown error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How can i re-write the code so the loading of the script will not fail even if the year &lt;SPAN style="font-size: 13.3333px;"&gt;isn't&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; in the inline yet&lt;/SPAN&gt;?&lt;/SPAN&gt;&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/where-Years-Year-Now-fail/m-p/1291908#M858887</guid>
      <dc:creator>sfloberg</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291909#M858888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Days, Years&lt;/P&gt;&lt;P&gt;1, 2015&lt;/P&gt;&lt;P&gt;2, 2015&lt;/P&gt;&lt;P&gt;3, 2015&lt;/P&gt;&lt;P&gt;4, 2016&lt;/P&gt;&lt;P&gt;5, 2016&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;where Years =Previous(Years);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 10:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291909#M858888</guid>
      <dc:creator>surendraj</dc:creator>
      <dc:date>2017-01-22T10:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291910#M858889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But this will only give me the 2016 values. I need it to be the 2017 values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:01:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291910#M858889</guid>
      <dc:creator>sfloberg</dc:creator>
      <dc:date>2017-01-22T11:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291911#M858891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So when the admin enter the 2017 values, the code you just wrote will only give me the 2016 values. I need it to give me the 2017 values and the script to load even if just 2016 exists in the file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291911#M858891</guid>
      <dc:creator>sfloberg</dc:creator>
      <dc:date>2017-01-22T11:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291912#M858892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are no 2017 values.please elaborate on your requirement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291912#M858892</guid>
      <dc:creator>surendraj</dc:creator>
      <dc:date>2017-01-22T11:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291913#M858894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;When the admin enter the 2017 values - I need it to give me the 2017 values. But if only 2016 values exists I want it go give me 2016 and the script to load.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:17:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291913#M858894</guid>
      <dc:creator>sfloberg</dc:creator>
      <dc:date>2017-01-22T11:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291914#M858895</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 &lt;STRONG&gt;cannot use &lt;/STRONG&gt;&lt;STRONG&gt;Aggregation functions in the Where clause.&lt;/STRONG&gt; and we do not have the HAVING statement in Qlikview&lt;/P&gt;&lt;P&gt;So you have two options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) load the temp table &amp;gt;&amp;gt; Then Load Max(Year) in another table and using Peek() , retrieve the value in a variable&lt;/P&gt;&lt;P&gt;then load Resident from the temp table where Years = vVariableCreated;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) if you have a SQL Select statement use the Having Clause there.!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291914#M858895</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-22T11:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291915#M858897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;Tab_MaxYear:&lt;/P&gt;&lt;P&gt;load Max(Years) as MaxYear;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Years&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vMaxYear = Peek('MaxYear',0,'Tab_MaxYear');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Days, Years&lt;/P&gt;&lt;P&gt;1, 2015&lt;/P&gt;&lt;P&gt;2, 2015&lt;/P&gt;&lt;P&gt;3, 2015&lt;/P&gt;&lt;P&gt;4, 2016&lt;/P&gt;&lt;P&gt;5, 2016&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;where Years = $(vMaxYear);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291915#M858897</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-01-22T11:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291916#M858898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me you only want the record with the max year&lt;/P&gt;&lt;P&gt;This is one of the option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;X:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Days, Years&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4, 2016&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5, 2016&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Right Keep(X)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load max(Years) as Years&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident X;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291916#M858898</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2017-01-22T11:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291917#M858900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;BR /&gt;I tried this in a simple app before I try it in the correct one. But I get an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Bild1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/150376_Bild1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test1_tmp:&lt;/P&gt;&lt;P&gt;load Max(År) as MaxYear;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;År&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;2016&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vMaxYear = Peek('MaxYear', 0, 'Test1_tmp');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Dagar, År&lt;/P&gt;&lt;P&gt;1, 2016&lt;/P&gt;&lt;P&gt;2, 2016&lt;/P&gt;&lt;P&gt;3, 2016&lt;/P&gt;&lt;P&gt;4, 2016&lt;/P&gt;&lt;P&gt;5, 2015&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;Where År = $(vMaxYear);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291917#M858900</guid>
      <dc:creator>sfloberg</dc:creator>
      <dc:date>2017-01-22T11:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291918#M858901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with applying single quotes&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Where &lt;STRONG&gt;År = '$(vMaxYear)';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 11:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291918#M858901</guid>
      <dc:creator>surendraj</dc:creator>
      <dc:date>2017-01-22T11:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: where Years = Year(Now()) fail</title>
      <link>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291919#M858903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephanie, your script does not fail if I run it. It's just returning an empty table with your two fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using some more code?&lt;/P&gt;&lt;P&gt;If no records exists in your loaded table, you can't access any records in subsequent LOAD statements, right?&lt;/P&gt;&lt;P&gt;Is this maybe causing an error in your reload?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Stephanie Floberg wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;When the admin enter the 2017 values - I need it to give me the 2017 values. But if only 2016 values exists I want it go give me 2016 and the script to load.&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Have you tried what maxgro suggested?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: If you don't like the extra table, then you can drop it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;X:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Days, Years&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3, 2015&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;4, 2016&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;5, 2016&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;MaxYear:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Right Keep(X)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load max(Years) as Years&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident X;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Drop Table MaxYear;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 12:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/where-Years-Year-Now-fail/m-p/1291919#M858903</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-01-22T12:20:29Z</dc:date>
    </item>
  </channel>
</rss>

