<?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 Selecting a range of month names based on variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236244#M87442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change&lt;/P&gt;&lt;P&gt;num(Month)-4 as NewMonthNo&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;num(Month)-3 as NewMonthNo .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Oct 2010 13:27:58 GMT</pubDate>
    <dc:creator>syed_muzammil</dc:creator>
    <dc:date>2010-10-13T13:27:58Z</dc:date>
    <item>
      <title>Selecting a range of month names based on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236242#M87440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This is probably a very stupid question...&lt;/P&gt;&lt;P&gt;I am trying to make a listbox selection based on my variable $max_period_name which is set during the load script&lt;/P&gt;&lt;P&gt;I want to select all month names up to and including the variable (using April as month 1) on a specific sheet&lt;/P&gt;&lt;P&gt;I've tried this through triggers and macros and I just don't seem to be able to get the correct syntax to make it work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example of what I am trying to achieve, I couldn't think of a better way of demonstrating it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;=if(max_period_name='Apr' THEN set month_name='Apr', ELSE&lt;BR /&gt; if(max_period_name='May' THEN set month_name="'Apr','May'", ELSE&lt;BR /&gt; if(max_period_name='Jun' THEN set month_name="'Apr','May','Jun'", ELSE&lt;BR /&gt; if(max_period_name='Jul' THEN set month_name="'Apr','May','Jun','Jul'", ELSE ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 11:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236242#M87440</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2010-10-13T11:33:16Z</dc:date>
    </item>
    <item>
      <title>Selecting a range of month names based on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236243#M87441</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;In the load script make another field&lt;/P&gt;&lt;P&gt;num(Month)-4 as NewMonthNo&lt;/P&gt;&lt;P&gt;Now you have NewMonthNo as 1 for April.&lt;/P&gt;&lt;P&gt;Then create another variable&lt;/P&gt;&lt;P&gt;vTemp&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;=if(max_period_name='Apr',1,&lt;BR /&gt; if(max_period_name='May',2,&lt;BR /&gt; if(max_period_name='Jun',3,......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your list box expression write the follwing expression&lt;/P&gt;&lt;P&gt;if(NewMonthNo&amp;gt;=1 and NewMonthNo&amp;lt;=vTemp,Month).&lt;/P&gt;&lt;P&gt;In the sort order sort by expression NewMonthNo.&lt;/P&gt;&lt;P&gt;Hope this will solve it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Syed Muzammil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 13:26:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236243#M87441</guid>
      <dc:creator>syed_muzammil</dc:creator>
      <dc:date>2010-10-13T13:26:14Z</dc:date>
    </item>
    <item>
      <title>Selecting a range of month names based on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236244#M87442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change&lt;/P&gt;&lt;P&gt;num(Month)-4 as NewMonthNo&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;num(Month)-3 as NewMonthNo .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 13:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236244#M87442</guid>
      <dc:creator>syed_muzammil</dc:creator>
      <dc:date>2010-10-13T13:27:58Z</dc:date>
    </item>
    <item>
      <title>Selecting a range of month names based on variable</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236245#M87443</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;BR /&gt;Sorry I am at a complete loss as to how that helps me, my apologies if I have missed the point.&lt;/P&gt;&lt;P&gt;What I am trying to do is when the sheet is selected, make a &lt;B&gt;selection&lt;/B&gt; in the list box which contains month names 'Apr' 'May' 'June' etc up to and including the latest month.&lt;/P&gt;&lt;P&gt;My sorting is fine as I just used wildmatch(month_name, 'Apr','May','Jun' etc)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Oct 2010 15:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-range-of-month-names-based-on-variable/m-p/236245#M87443</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2010-10-13T15:06:57Z</dc:date>
    </item>
  </channel>
</rss>

