<?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 Month slider that sets a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Month-slider-that-sets-a-variable/m-p/288313#M107206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the Min and Max you refer to this will alter based on your current selection - which you probably don't want. You could try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({1}MonthYear)&amp;nbsp; and max({1}MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The {1} in both cases telling QlikView to ignore any selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also want to ensure that the month value on the slider is a formatted date with only one value per month (eg. the frist day).&amp;nbsp; To do this have the following in your load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(monthstart(MonthYear), 'MMM-YY') as MonthYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, set analysis is quite picky about date formats, and I would imagine the $Varaible will just contain a number for the date rather than the formatted date.&amp;nbsp; The best way around this is to have two variables, one on the slider and a formatted one to use in Set Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a variable called vFormatedVar and set it to &lt;STRONG&gt;=Date(Variable, 'MMM-YY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use this in Set Analysis rather than the slider variable, eg.&amp;nbsp; &lt;STRONG&gt;sum({&amp;lt;MonthYear=$(vFormattedVar)&amp;gt;}Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If things are still not working out perhaps you could post an example .qvw showing how it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.quickintelligence.co.uk/"&gt;http://www.quickintelligence.co.uk/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2011 22:23:42 GMT</pubDate>
    <dc:creator>stevedark</dc:creator>
    <dc:date>2011-10-05T22:23:42Z</dc:date>
    <item>
      <title>Month slider that sets a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Month-slider-that-sets-a-variable/m-p/288312#M107205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a month slider that can set a variable.&amp;nbsp; I want to be able to write in set analysis for certain charts something along the lines of {&amp;lt;MonthYear={'$Variable'}&amp;gt;}.&amp;nbsp; I want the slider to show all the Months in our time period for our data in the format of 'MMM-YY'.&amp;nbsp; I tried to do Min(MonthYear) for the minimum value and both Max(MonthYear) and Date(MonthStart(today()), 'MMM-YY') for the maximum value with my variable in the Data section of the slider.&amp;nbsp; This only changed the variable to one value instead of a group of values or in other cases gave me completely wrong values for the slider.&amp;nbsp; I would really appreciate some help with this issue.&amp;nbsp; Thanks in advance!&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 21:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-slider-that-sets-a-variable/m-p/288312#M107205</guid>
      <dc:creator />
      <dc:date>2011-06-14T21:54:20Z</dc:date>
    </item>
    <item>
      <title>Month slider that sets a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Month-slider-that-sets-a-variable/m-p/288313#M107206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the Min and Max you refer to this will alter based on your current selection - which you probably don't want. You could try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({1}MonthYear)&amp;nbsp; and max({1}MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The {1} in both cases telling QlikView to ignore any selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will also want to ensure that the month value on the slider is a formatted date with only one value per month (eg. the frist day).&amp;nbsp; To do this have the following in your load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date(monthstart(MonthYear), 'MMM-YY') as MonthYear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, set analysis is quite picky about date formats, and I would imagine the $Varaible will just contain a number for the date rather than the formatted date.&amp;nbsp; The best way around this is to have two variables, one on the slider and a formatted one to use in Set Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a variable called vFormatedVar and set it to &lt;STRONG&gt;=Date(Variable, 'MMM-YY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use this in Set Analysis rather than the slider variable, eg.&amp;nbsp; &lt;STRONG&gt;sum({&amp;lt;MonthYear=$(vFormattedVar)&amp;gt;}Value)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If things are still not working out perhaps you could post an example .qvw showing how it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.quickintelligence.co.uk/"&gt;http://www.quickintelligence.co.uk/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 22:23:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Month-slider-that-sets-a-variable/m-p/288313#M107206</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-10-05T22:23:42Z</dc:date>
    </item>
  </channel>
</rss>

