<?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 Macro for selecting year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-for-selecting-year/m-p/187399#M51092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to write a macro for selecting this year and previous year, when the data is reloaded.&lt;/P&gt;&lt;P&gt;How do I write the macro ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Nov 2010 11:00:36 GMT</pubDate>
    <dc:creator>johanlind</dc:creator>
    <dc:date>2010-11-15T11:00:36Z</dc:date>
    <item>
      <title>Macro for selecting year</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-for-selecting-year/m-p/187399#M51092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to write a macro for selecting this year and previous year, when the data is reloaded.&lt;/P&gt;&lt;P&gt;How do I write the macro ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 11:00:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-for-selecting-year/m-p/187399#M51092</guid>
      <dc:creator>johanlind</dc:creator>
      <dc:date>2010-11-15T11:00:36Z</dc:date>
    </item>
    <item>
      <title>SV:Macro for selecting year</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-for-selecting-year/m-p/187400#M51093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would create an OnPostReload Trigger with a Selection Action, like this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/8270.selectinfield.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/8270.selectinfield.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get it dynamic create a variable CurrentYear which you sets to the current year in the load script,&lt;/P&gt;&lt;P&gt;and change the Search String shown above to this instead:&lt;/P&gt;&lt;P&gt;='&amp;gt;=' &amp;amp; ($(CurrentYear)-1) &amp;amp; ' &amp;lt;=' &amp;amp; $(CurrentYear)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 15:02:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-for-selecting-year/m-p/187400#M51093</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2010-11-15T15:02:33Z</dc:date>
    </item>
  </channel>
</rss>

