<?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 Pass value from Input box to script after reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362154#M493998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to solve for the code below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear))}&amp;gt;} [Spend]))&lt;/SPAN&gt; /&lt;/P&gt;&lt;P&gt;sum(aggr(sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear)-1)}&amp;gt;} [Spend])) /&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear)-1)},CalendarQuarter=,CalendarMonth=&amp;gt;} Qty)) *&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear))}&amp;gt;} if(len(Subcategory)&amp;gt;0,Qty)), Material))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On top of this I want to add the below condition for spend in the numerator (highlighted in red):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate spend in current year only when Material exists in "max(CalendarYear)-1" so I wanted to use an aggr function in Numerator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried addressing this by passing a value from input box to a variable in the script, kindly help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2012 21:39:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-20T21:39:48Z</dc:date>
    <item>
      <title>Pass value from Input box to script after reload</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362152#M493996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to pass user defined value to create another varable in the script.In other words, the variable in the script shud dynamically change calculations based on user input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 20:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362152#M493996</guid>
      <dc:creator />
      <dc:date>2012-04-20T20:53:51Z</dc:date>
    </item>
    <item>
      <title>Pass value from Input box to script after reload</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362153#M493997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this system function is of interest for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor1306"&gt;&lt;/A&gt;&lt;A name="input("&gt;&lt;/A&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="Bold"&gt;Input(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;str cue [, str caption]&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;This function can be used in the script only and opens an input box that prompts the user for a value during the script execution. The parameters cue and caption are used as message and caption texts, respectively. The function returns the entered value. &lt;/P&gt;&lt;P&gt;The input box function returns NULL if the dialog is cancelled, closed or cannot be shown. &lt;/P&gt;&lt;P class="example"&gt;&lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P class="example"&gt;&lt;/P&gt;&lt;P class="Code"&gt;Load &lt;BR /&gt;Input('Enter value', 'Input box') as v, &lt;BR /&gt;Recno () as r &lt;BR /&gt;autogenerate 3; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 21:27:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362153#M493997</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-04-20T21:27:56Z</dc:date>
    </item>
    <item>
      <title>Pass value from Input box to script after reload</title>
      <link>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362154#M493998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to solve for the code below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear))}&amp;gt;} [Spend]))&lt;/SPAN&gt; /&lt;/P&gt;&lt;P&gt;sum(aggr(sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear)-1)}&amp;gt;} [Spend])) /&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear)-1)},CalendarQuarter=,CalendarMonth=&amp;gt;} Qty)) *&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;CalendarYear = {$(#=max(CalendarYear))}&amp;gt;} if(len(Subcategory)&amp;gt;0,Qty)), Material))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On top of this I want to add the below condition for spend in the numerator (highlighted in red):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate spend in current year only when Material exists in "max(CalendarYear)-1" so I wanted to use an aggr function in Numerator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried addressing this by passing a value from input box to a variable in the script, kindly help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2012 21:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pass-value-from-Input-box-to-script-after-reload/m-p/362154#M493998</guid>
      <dc:creator />
      <dc:date>2012-04-20T21:39:48Z</dc:date>
    </item>
  </channel>
</rss>

