<?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 Set variable to a default value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2878#M418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a calendar object and use a variable (vDateSelected) to assign values to that object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a button which resets the value of the calendar to a default value. This means changing the current value of &lt;SPAN style="font-size: 13.3333px;"&gt;vDateSelected at the click of the reset button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For this I create a button with "Define variable" action where "Variable" = vDateSelected and "Value" = "=Min({[CurrentMonth]} [Date])". The problem is that the value expression is not interpreted and I have "-" as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the solution of this case? Any help is appreciated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jan 2018 13:25:51 GMT</pubDate>
    <dc:creator>edemerdjieva</dc:creator>
    <dc:date>2018-01-18T13:25:51Z</dc:date>
    <item>
      <title>Set variable to a default value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2878#M418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a calendar object and use a variable (vDateSelected) to assign values to that object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a button which resets the value of the calendar to a default value. This means changing the current value of &lt;SPAN style="font-size: 13.3333px;"&gt;vDateSelected at the click of the reset button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For this I create a button with "Define variable" action where "Variable" = vDateSelected and "Value" = "=Min({[CurrentMonth]} [Date])". The problem is that the value expression is not interpreted and I have "-" as a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the solution of this case? Any help is appreciated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 13:25:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2878#M418</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2018-01-18T13:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to a default value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2879#M419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elina, what is 'CurrentMonth'? a variable with month number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In example it can be something like:&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;=Min(&lt;EM&gt;{&amp;lt;MonthNumField={$(CurrentMonth)}&amp;gt;}&lt;/EM&gt; [Date])&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;It will filter a field with months in numbers called &lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthNumField&lt;/EM&gt;, where the month number is equal to the variable &lt;EM style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CurrentMonth&lt;/EM&gt;, form that month thakes the min date&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 17:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2879#M419</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2018-01-18T17:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to a default value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2880#M420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ruben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'CurrentMonth' is one of the values in the "Time" dimension that I use (defined in the load script).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made another test: I assigned the expression "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Min(&lt;/SPAN&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;MonthNumField={$(CurrentMonth)}&amp;gt;}&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; [Date])" to a variable in the script and then modified the button action as follows:&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;"Variable" = vDateSelected&lt;/SPAN&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;"Value" = vNewDate&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&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;But the result is: calendar object is now empty. I have the impression that the expression in vNewDate is not interpreted. On the contrary, if I assign a fixed value to the variable &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vNewDate then it works (date changes in the calendar object after button click).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&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;Why QlikView does not interpret the expression?&lt;BR /&gt;&lt;/SPAN&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 09:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2880#M420</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2018-01-19T09:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set variable to a default value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2881#M421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it with:&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;=&lt;STRONG&gt;Date(&lt;/STRONG&gt;Min(&lt;/SPAN&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{&amp;lt;MonthNumField={$(CurrentMonth)}&amp;gt;}&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; [Date])&lt;STRONG&gt;)&lt;/STRONG&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because functions like min/max return not a string-interpretation of a date else just the pure number like 43119 for 2018/01/19.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 14:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-variable-to-a-default-value/m-p/2881#M421</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-01-19T14:21:51Z</dc:date>
    </item>
  </channel>
</rss>

