<?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: Question on Load script with while statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430220#M430296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Monthly data could be treated as daily data just by converting the Year and Month into a date. For example with something like: makedate(Year, Month, 1) which made the handling quite easy. We use this approach since many years and concatenate the budget data just to the sales data whereby the comparing of both values is done with a monthly forecast of sales and the budget is already a monthly value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Sep 2017 14:30:33 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2017-09-18T14:30:33Z</dc:date>
    <item>
      <title>Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430217#M430293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to load project budget to each month between project start date and project end date.I have question on my loading script:&lt;/P&gt;&lt;P&gt;Here is loading script for daily budget. This one working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD [Proj ID] as GoalProj,&lt;BR /&gt; Year([Proj Start Dt]+iterno()-1) as GoalYear, &lt;BR /&gt; Month([Proj Start Dt]+iterno()-1) as GoalMonth, &lt;BR /&gt; num(Month([Proj Start Dt]+iterno()-1)) as GoalMonthNo, &lt;BR /&gt; Date([Proj Start Dt]+iterno()-1) as GoalDate, &lt;BR /&gt; [Proj Tot Value]/([Proj End Dt]-[Proj Start Dt]+1) as DailyGoalAmount&lt;BR /&gt; while ([Proj Start Dt]+iterno()-1) &amp;lt;= [Proj End Dt]&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is monthly budget loading stript. This one is not working because the while statement is not right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD [Proj ID] as GoalProj,&lt;BR /&gt; Year([Proj Start Dt]+iterno()-1) as GoalYear, &lt;BR /&gt; Month([Proj Start Dt]+iterno()-1) as GoalMonth, &lt;BR /&gt; num(Month([Proj Start Dt]+iterno()-1)) as GoalMonthNo, &lt;BR /&gt; //Date([Proj Start Dt]+iterno()-1) as GoalDate, &lt;BR /&gt; [Proj Tot Value]/((year([Proj End Dt])*12+Month([Proj End Dt]))-(Year([Proj Start Dt])*12+month([Proj Start Dt]))+1 ) as MonthlyGoalAmount&lt;BR /&gt;while (num(Year([Proj Start Dt])*12+month([Proj Start Dt]))+iterno()-1) &amp;lt;= num(year([Proj End Dt])*12+Month([Proj End Dt])) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help find why this monthly loading script is not working?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you guys very much!&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 00:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430217#M430293</guid>
      <dc:creator />
      <dc:date>2017-09-18T00:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430218#M430294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the while-condition should be look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while addmonths(monthstart([Proj Start Dt]), iterno() - 1)) &amp;lt; monthend([Proj End Dt]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe with a bit adjusting to really needed dates which might be the exact date or any kind of monthstart/monthend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside them I'm not sure if I would use such a monthly budget-table - why not using the table on the daily-level and then aggregating them on any needed period within the charts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 12:37:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430218#M430294</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-09-18T12:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430219#M430295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much - Marcus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution looks very very smart. But It looks only run one time when I test this script. The result is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="749"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="109"&gt;Project ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="170"&gt;Proj Name&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="76"&gt;Proj Start Dt&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="69"&gt;Proj End Dt&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="84"&gt;Proj Tot Value&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="120"&gt;MonthlyGoalAmount&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="66"&gt;GoalMonth&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="55"&gt;GoalYear&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0001&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;09/30/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;2612383&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;261238.3&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0002&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;09/30/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;221581&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;22158.1&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0003&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;1208&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;92.92307692&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0004&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;206204&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15861.84615&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0005&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;729686&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;56129.69231&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0006&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;39541&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3041.615385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0007&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;5031&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;387&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0008&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;40009&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3077.615385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0009&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;6699&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;515.3076923&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0010&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;3256&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;250.4615385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0011&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;73066&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5620.461538&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0012&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12291&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;945.4615385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0013&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;197628&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15202.15385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0014&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;186244&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;14326.46154&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;157816&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;12139.69231&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;64216&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4939.692308&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="17" style="border-top: none;"&gt;BJ1-0017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Work TRANSER&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/12/2016&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;12/31/2017&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;51059&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3927.615385&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Dec&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2016&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I want to generate monthly goal is my revenue actual is by month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your inputs. Appreciate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 14:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430219#M430295</guid>
      <dc:creator />
      <dc:date>2017-09-18T14:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430220#M430296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Monthly data could be treated as daily data just by converting the Year and Month into a date. For example with something like: makedate(Year, Month, 1) which made the handling quite easy. We use this approach since many years and concatenate the budget data just to the sales data whereby the comparing of both values is done with a monthly forecast of sales and the budget is already a monthly value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 14:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430220#M430296</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-09-18T14:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430221#M430297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are awesome with so many good solutions on my question. We have monthly revenue actual. But for project budget is by project period based on project start date and project end date. So I try to average this budget by months and compare to actual.&lt;/P&gt;&lt;P&gt;For&amp;nbsp; the loading script, the daily script is working and can get budget for each day. I just cannot understand why the monthly script is only run once when load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again - Marcus. Your reply is greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Sep 2017 14:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430221#M430297</guid>
      <dc:creator />
      <dc:date>2017-09-18T14:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430222#M430298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like above mentioned I would quite probably go with a daily budget-value and aggregate the needed periods over them within the UI. I didn't test a while-loop to create monthly budget-values but I created two versions of them with aggregation-loads. Maybe it's helpful for you to find the most suitable approach for your use-case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DailyBudget:&lt;/P&gt;&lt;P&gt;load *, MonthName(monthstart(Date)) as MonthName;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *, date(From + iterno() -1) as Date, [Proj Tot Value] / (To - From) as DailyBudget &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while From + iterno() - 1 &amp;lt;= To;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Project ID], [Proj Name],&amp;nbsp;&amp;nbsp;&amp;nbsp; [Proj Tot Value], [MonthlyGoalAmount], [Proj Start Dt], [Proj End Dt], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date#([Proj Start Dt], 'MM/DD/YYYY')) as From, date(date#([Proj End Dt], 'MM/DD/YYYY')) as To&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inline [&lt;/P&gt;&lt;P&gt;Project ID&amp;nbsp;&amp;nbsp;&amp;nbsp; Proj Name&amp;nbsp;&amp;nbsp;&amp;nbsp; Proj Start Dt&amp;nbsp;&amp;nbsp;&amp;nbsp; Proj End Dt&amp;nbsp;&amp;nbsp;&amp;nbsp; Proj Tot Value&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthlyGoalAmount&amp;nbsp;&amp;nbsp;&amp;nbsp; GoalMonth&amp;nbsp;&amp;nbsp;&amp;nbsp; GoalYear&lt;/P&gt;&lt;P&gt;BJ1-0001&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/30/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 2612383&amp;nbsp;&amp;nbsp;&amp;nbsp; 261238.3&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0002&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/30/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 221581&amp;nbsp;&amp;nbsp;&amp;nbsp; 22158.1&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0003&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 1208&amp;nbsp;&amp;nbsp;&amp;nbsp; 92.92307692&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0004&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 206204&amp;nbsp;&amp;nbsp;&amp;nbsp; 15861.84615&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0005&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 729686&amp;nbsp;&amp;nbsp;&amp;nbsp; 56129.69231&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0006&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 39541&amp;nbsp;&amp;nbsp;&amp;nbsp; 3041.615385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0007&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 5031&amp;nbsp;&amp;nbsp;&amp;nbsp; 387&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0008&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 40009&amp;nbsp;&amp;nbsp;&amp;nbsp; 3077.615385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0009&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 6699&amp;nbsp;&amp;nbsp;&amp;nbsp; 515.3076923&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0010&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 3256&amp;nbsp;&amp;nbsp;&amp;nbsp; 250.4615385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0011&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 73066&amp;nbsp;&amp;nbsp;&amp;nbsp; 5620.461538&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0012&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 12291&amp;nbsp;&amp;nbsp;&amp;nbsp; 945.4615385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0013&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 197628&amp;nbsp;&amp;nbsp;&amp;nbsp; 15202.15385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0014&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 186244&amp;nbsp;&amp;nbsp;&amp;nbsp; 14326.46154&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0015&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 157816&amp;nbsp;&amp;nbsp;&amp;nbsp; 12139.69231&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0016&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 64216&amp;nbsp;&amp;nbsp;&amp;nbsp; 4939.692308&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;BJ1-0017&amp;nbsp;&amp;nbsp;&amp;nbsp; Work TRANSER&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/12/2016&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/31/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 51059&amp;nbsp;&amp;nbsp;&amp;nbsp; 3927.615385&amp;nbsp;&amp;nbsp;&amp;nbsp; Dec&amp;nbsp;&amp;nbsp;&amp;nbsp; 2016&lt;/P&gt;&lt;P&gt;] (txt, delimiter is \t);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MonthlyBudget1:&lt;/P&gt;&lt;P&gt;load [Project ID], dual(date(floor(monthstart(Date)), 'YYYY-MM'), date(floor(monthstart(Date)))) as YearMonth1, sum(DailyBudget) as MonthlyBudget1&lt;/P&gt;&lt;P&gt;resident DailyBudget group by [Project ID], dual(date(floor(monthstart(Date)), 'YYYY-MM'), date(floor(monthstart(Date))));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (MonthlyBudget1)&lt;/P&gt;&lt;P&gt;load [Project ID], avg([Proj Tot Value]) / count(distinct MonthName) as MonthlyBudget2&lt;/P&gt;&lt;P&gt;resident DailyBudget group by [Project ID];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 07:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430222#M430298</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-09-19T07:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Question on Load script with while statement</title>
      <link>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430223#M430299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution looks great for my question. MonthlyBudget2 is looks right. I am going to implement your script to my app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much on your smart and nice solution. Wish you all the best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dust&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 13:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-on-Load-script-with-while-statement/m-p/1430223#M430299</guid>
      <dc:creator />
      <dc:date>2017-09-19T13:52:39Z</dc:date>
    </item>
  </channel>
</rss>

