<?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 Re: To create dynamic variable in Load Script so that i can create a expression in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41496#M6990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't worked but i somehow made a logic on the back end to summaries the Date field with the All the data (Year Month) and made a flag out of it.&lt;/P&gt;&lt;P&gt;It is working fine for me now. &lt;/P&gt;&lt;P&gt;Thanks for your support. Really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 06:44:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-05T06:44:05Z</dc:date>
    <item>
      <title>To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41491#M6985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was facing an issue with my data model as i have to create everything in the load script. Everything is working as expected but there is one issue that there are two variables created in the Front End like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vStartDate=Floor(Date(Max(AddMonths([Fiscal Date],3)),'DD-MMM-YYYY'))&lt;/P&gt;&lt;P&gt;vEndDate= Floor(Date(MonthEnd(Max(AddMonths([Fiscal Date],3))),'DD-MMM-YYYY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;variable's &lt;/SPAN&gt;value &lt;/SPAN&gt;depends on the selection of [Fiscal Date]. I Want to d it in Script End as this is the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody suggest how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manish Rawat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/4003"&gt;hic&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/187194"&gt;djk&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/211622"&gt;lech_miszkiewicz&lt;/A&gt;‌&amp;nbsp; &lt;A href="https://community.qlik.com/space/1"&gt;Qlik Community&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 05:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41491#M6985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-01T05:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41492#M6986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can define them in the load script by using SET statements like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vStartDate='=Floor(Date(Max(AddMonths([Fiscal Date],3)),''DD-MMM-YYYY''))';&lt;/P&gt;&lt;P&gt;SET vEndDate='=Floor(Date(MonthEnd(Max(AddMonths([Fiscal Date],3))),''DD-MMM-YYYY''))';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that you have to use two single quotes to get one single quotes inside a string that is delimited by single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't like the double quoting you could actually write it verbatim but you must then have a space between the two equal characters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vStartDate&lt;STRONG&gt;= =&lt;/STRONG&gt;Floor(Date(Max(AddMonths([Fiscal Date],3)),'DD-MMM-YYYY')) ;&lt;/P&gt;&lt;P&gt;SET vEndDate&lt;STRONG&gt;= =&lt;/STRONG&gt;Floor(Date(MonthEnd(Max(AddMonths([Fiscal Date],3))),'DD-MMM-YYYY')) ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 06:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41492#M6986</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-01T06:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41493#M6987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. &lt;/P&gt;&lt;P&gt;How do you want me to implement this as if i declare those two variable Using SET and with using peek, then i'll be getting either Max Value or Min Value depending upon the parameter we give in Peek (0 or -1).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My Requirement:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Existing:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;I&lt;SPAN style="font-size: 10pt;"&gt;f user Selects Year=2018 and Month=Apr then vStart= 4/1/2018 (Num Converted to date)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and similarly vEnd=4/30/2018 . It all depends on the selection.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;As it should be: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;it all should happen in Load Script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kindly provide me the workaround to do as you suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Adv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 07:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41493#M6987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-01T07:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41494#M6988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to get the max value of [Fiscal Date] while running the load script then you can use a Peek. Then it is not a selection in Qlik terms....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15278415736689159 jive_text_macro" jivemacro_uid="_15278415736689159" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MAX_FISCAL: LOAD Max([Fiscal Date]) AS MaxFiscalDate RESIDENT &amp;lt;the-table-containing-Fiscal-Date&amp;gt;;&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;&lt;SPAN style="font-size: 13.3333px;"&gt;vStartDate=Floor(Date(AddMonths(Peek(MaxFiscalDate),3),'DD-MMM-YYYY')) ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;vEndDate=Floor(Date(MonthEnd(AddMonths(Peek(MaxFiscalDate),3),'DD-MMM-YYYY')) ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABBLE MAX_FISCAL;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 08:28:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41494#M6988</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-01T08:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41495#M6989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did this work for you?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 13:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41495#M6989</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-04T13:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41496#M6990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It didn't worked but i somehow made a logic on the back end to summaries the Date field with the All the data (Year Month) and made a flag out of it.&lt;/P&gt;&lt;P&gt;It is working fine for me now. &lt;/P&gt;&lt;P&gt;Thanks for your support. Really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 06:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41496#M6990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-05T06:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: To create dynamic variable in Load Script so that i can create a expression in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41497#M6991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome. Please mark the question as answered to close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 06:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-create-dynamic-variable-in-Load-Script-so-that-i-can-create-a/m-p/41497#M6991</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-06-05T06:46:12Z</dc:date>
    </item>
  </channel>
</rss>

