<?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: Creating New Calculative Fields in Load Scrip in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1568134#M596494</link>
    <description>&lt;P&gt;Here is another option for you to try&lt;/P&gt;&lt;PRE&gt;Table:
LOAD *,
	 IterNo() as Week,
	 Date(Start_Date + ((IterNo()-1)*7)) as Dates
While Start_Date + ((IterNo()-1)*7) &amp;lt; End_Date;
LOAD * INLINE [
    Year, Period, Start_Date, End_Date
    2017, 1, 20/2/2017, 19/05/2017
    2017, 2, 19/06/2017, 15/09/2017
    2017, 3, 16/10/2017, 19/01/2018
    2018, 1, 19/02/2019, 1805/2018
    2018, 2, 18/06/2018, 14/09/2018
    2018, 3, 15/10/2018, 25/01/2019
    2019, 1, 25/02/2019, 24/05/2019
    2019, 2, 24/06/2019, 20/09/2019
    2019, 3, 21/10/2019, 24/01/2020
    2020, 1, 24/02/2020, 22/05/2020
    2020, 2, 22/06/2020, 18/09/2020
    2020, 3, 19/10/2020, 22/01/2021
];&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Apr 2019 11:22:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-04-11T11:22:40Z</dc:date>
    <item>
      <title>Creating New Calculative Fields in Load Scrip</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567931#M596492</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Part of a bigger project I am working on, I have to figure out numbers of week between&amp;nbsp; Start and End date. From below screenshot, for each Start_date to End_date I want to figure out weeks in 7 days block. I tried using nested If statement as per below. But, it does not satisfy my need.&amp;nbsp; In a nutshell I want to create two new fields as per the Desire screenshot below -- Weeks and Dates&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="source data.PNG" style="width: 391px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9936iAE5B31B04DE70AA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="source data.PNG" alt="source data.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Desire.PNG" style="width: 434px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9937i60AB43CF3E638825/image-size/large?v=v2&amp;amp;px=999" role="button" title="Desire.PNG" alt="Desire.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sample code.PNG" style="width: 793px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/9938i135E9CD201E971A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="sample code.PNG" alt="sample code.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will appreciate your advice.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567931#M596492</guid>
      <dc:creator>saifuddin</dc:creator>
      <dc:date>2024-11-16T03:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Calculative Fields in Load Scrip</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567985#M596493</link>
      <description>&lt;P&gt;Solution suggested here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Scripting/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567932#M94811" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Scripting/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567932#M94811&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 07:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1567985#M596493</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2019-04-11T07:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Calculative Fields in Load Scrip</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1568134#M596494</link>
      <description>&lt;P&gt;Here is another option for you to try&lt;/P&gt;&lt;PRE&gt;Table:
LOAD *,
	 IterNo() as Week,
	 Date(Start_Date + ((IterNo()-1)*7)) as Dates
While Start_Date + ((IterNo()-1)*7) &amp;lt; End_Date;
LOAD * INLINE [
    Year, Period, Start_Date, End_Date
    2017, 1, 20/2/2017, 19/05/2017
    2017, 2, 19/06/2017, 15/09/2017
    2017, 3, 16/10/2017, 19/01/2018
    2018, 1, 19/02/2019, 1805/2018
    2018, 2, 18/06/2018, 14/09/2018
    2018, 3, 15/10/2018, 25/01/2019
    2019, 1, 25/02/2019, 24/05/2019
    2019, 2, 24/06/2019, 20/09/2019
    2019, 3, 21/10/2019, 24/01/2020
    2020, 1, 24/02/2020, 22/05/2020
    2020, 2, 22/06/2020, 18/09/2020
    2020, 3, 19/10/2020, 22/01/2021
];&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Apr 2019 11:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1568134#M596494</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-04-11T11:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating New Calculative Fields in Load Scrip</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1568465#M596495</link>
      <description>Thanks Sunny. Quick and easy solution. Appreciate your help.&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Apr 2019 01:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-New-Calculative-Fields-in-Load-Scrip/m-p/1568465#M596495</guid>
      <dc:creator>saifuddin</dc:creator>
      <dc:date>2019-04-12T01:27:58Z</dc:date>
    </item>
  </channel>
</rss>

