<?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: Search year based on expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253480#M499514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using QV 8.5.&amp;nbsp; To accomplish this I use a macro using an expression similar to yours.&amp;nbsp; See the attached example which highlights the year based on the previous month.&amp;nbsp; In this example the year is highlighted on open and post reload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jul 2011 14:30:55 GMT</pubDate>
    <dc:creator>john_duffy</dc:creator>
    <dc:date>2011-07-04T14:30:55Z</dc:date>
    <item>
      <title>Search year based on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253479#M499513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question about selecting a year based on todays date (QlikView v. 9 SR6).&lt;/P&gt;&lt;P&gt;Here's the scenario: I have list box displaying a field named date_YYYY, containing the values 2008, 2009, 2010 and 2011.&lt;/P&gt;&lt;P&gt;I would like to be able to highlight the year belonging to the date of exactly one month ago from today. To do this, I try to use an expression in the search box:&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;=Year(Addmonths(today(),-1))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this selects all years instead of 1.&lt;/P&gt;&lt;P&gt;Using the exact same expression as Text in a text object displays the year just fine, in case of today that's 2011.&lt;/P&gt;&lt;P&gt;I' ve tried an alternative approach using dollar sign expansion and a variable containing the expression, but no results so far.&lt;/P&gt;&lt;P&gt;Does anybody have an idea how to get this to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 13:47:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253479#M499513</guid>
      <dc:creator />
      <dc:date>2011-07-04T13:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search year based on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253480#M499514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using QV 8.5.&amp;nbsp; To accomplish this I use a macro using an expression similar to yours.&amp;nbsp; See the attached example which highlights the year based on the previous month.&amp;nbsp; In this example the year is highlighted on open and post reload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 14:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253480#M499514</guid>
      <dc:creator>john_duffy</dc:creator>
      <dc:date>2011-07-04T14:30:55Z</dc:date>
    </item>
    <item>
      <title>Search year based on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253481#M499515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;John, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. I've tried the same thing and it works, but unfortunately I'm gonna need a solution that does not depend on a macro (company policy) -- sorry, should have mentioned this in my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 15:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253481#M499515</guid>
      <dc:creator />
      <dc:date>2011-07-04T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Search year based on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253482#M499516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found this link from Rob Wunderlich on a discussion regarding setting initial selections - &lt;A href="http://qlikviewnotes.blogspot.com/2010/02/setting-initial-selections-in-version-9.html"&gt;http://qlikviewnotes.blogspot.com/2010/02/setting-initial-selections-in-version-9.html&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the information in this link I was able to set the YYYY field using an on open and on post reload trigger (see attached).&amp;nbsp; We are in the process of migrating from QV8.5 to QV10 so I was able to do this in QV10 (see attached).&amp;nbsp; Not sure if it works the same in QV9. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 15:35:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253482#M499516</guid>
      <dc:creator>john_duffy</dc:creator>
      <dc:date>2011-07-04T15:35:45Z</dc:date>
    </item>
    <item>
      <title>Search year based on expression</title>
      <link>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253483#M499517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does it. &lt;/P&gt;&lt;P&gt;By the way, I found another way for entering a search value in the list box that does work too: instead of entering the expression &lt;CODE class="jive-code"&gt;=Year(Addmonths(today(),-1))&lt;/CODE&gt;,one should enter &lt;CODE class="jive-code"&gt;=date_YYYY=Year(Addmonths(today(),-1)).&lt;/CODE&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2011 06:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Search-year-based-on-expression/m-p/253483#M499517</guid>
      <dc:creator />
      <dc:date>2011-07-05T06:45:47Z</dc:date>
    </item>
  </channel>
</rss>

