<?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 Calculating a variable from an input field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769477#M454513</link>
    <description>&lt;P&gt;Afternoon everyone,&lt;/P&gt;&lt;P&gt;I am sure I am missing something very straightforward, so some assistance would be appreciated.&amp;nbsp; In my load script I load a master calendar, Which has a range of dates corresponding to the range of dates in the transaction file, plus the number of the week in the year. The date links to a date field in the transaction file I am loading.&amp;nbsp; I want the user to enter a date (any date in the range of the master calendar) which I store in a variable I called 'vInputDate'. Based on the date the user enters I want to assign a variable the corresponding value of the week variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if the user enters 12/12/2020, I want the week variable to reflect 50, and if the user enters 16/12/2020 I want the week variable to reflect 51. This needs to be done dynamically as the user can select whichever date he wants to report on.&lt;/P&gt;&lt;P&gt;Thanks, always appreciate the input from this forum.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Braham&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 17:41:21 GMT</pubDate>
    <dc:creator>braham</dc:creator>
    <dc:date>2024-11-16T17:41:21Z</dc:date>
    <item>
      <title>Calculating a variable from an input field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769477#M454513</link>
      <description>&lt;P&gt;Afternoon everyone,&lt;/P&gt;&lt;P&gt;I am sure I am missing something very straightforward, so some assistance would be appreciated.&amp;nbsp; In my load script I load a master calendar, Which has a range of dates corresponding to the range of dates in the transaction file, plus the number of the week in the year. The date links to a date field in the transaction file I am loading.&amp;nbsp; I want the user to enter a date (any date in the range of the master calendar) which I store in a variable I called 'vInputDate'. Based on the date the user enters I want to assign a variable the corresponding value of the week variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if the user enters 12/12/2020, I want the week variable to reflect 50, and if the user enters 16/12/2020 I want the week variable to reflect 51. This needs to be done dynamically as the user can select whichever date he wants to report on.&lt;/P&gt;&lt;P&gt;Thanks, always appreciate the input from this forum.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Braham&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769477#M454513</guid>
      <dc:creator>braham</dc:creator>
      <dc:date>2024-11-16T17:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a variable from an input field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769646#M454518</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28113"&gt;@braham&lt;/a&gt;, I'm not sure to undesrtand... in document properties -&amp;gt; triggers -&amp;gt; vriable events, you can select the vIndputdate variable and add actions for this variable value seet or changed, this actions can change to week variable (Actions -&amp;gt;external -&amp;gt; set variable).&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 13:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769646#M454518</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2020-12-19T13:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating a variable from an input field</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769649#M454519</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;, Thanks for the suggestion. I have not worked with triggers, so this solution would be new to me. I did however find a solution. I defined another variable (vInputWeek) to be:&lt;/P&gt;&lt;P&gt;Max(If($vInputDate)=TableDate, MasterCalendarWeek). When the vInputDate is updated the value of this variable changes to the correct week number. I can now use that to report on.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2020 14:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-a-variable-from-an-input-field/m-p/1769649#M454519</guid>
      <dc:creator>braham</dc:creator>
      <dc:date>2020-12-19T14:03:47Z</dc:date>
    </item>
  </channel>
</rss>

