<?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: Separate date timeframes into single rows ie. by month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2032983#M85116</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Table]:&lt;/P&gt;
&lt;P&gt;load *,&lt;BR /&gt;date(AddMonths(valid_from,iterno()-1),'MM/YYYY') as MonthYear&lt;BR /&gt;while date(valid_to)&amp;gt;=AddMonths(valid_from,iterno()-1) ;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;LOAD * INLINE &lt;BR /&gt;[&lt;BR /&gt;person,valid_from,valid_to,salary&lt;BR /&gt;A,01/02/2023,31/12/2023,2000&lt;BR /&gt;B,01/03/2023,30/06/2023,3000&lt;/P&gt;
&lt;P&gt;A,01/01/2024,28/02/2024,2200&lt;BR /&gt;A,01/01/2024,28/02/2024,2200&lt;BR /&gt;](delimiter is ',');&lt;/P&gt;
&lt;P&gt;Table :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brunobertels_0-1675272535290.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99476i67442C9F1C3F21CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brunobertels_0-1675272535290.png" alt="brunobertels_0-1675272535290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2023 17:29:07 GMT</pubDate>
    <dc:creator>brunobertels</dc:creator>
    <dc:date>2023-02-01T17:29:07Z</dc:date>
    <item>
      <title>Separate date timeframes into single rows ie. by month</title>
      <link>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2032762#M85096</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;we use a database to define the salary of our employees for specific timeframes. Qlik should be used to get an outlook for salary cost for a specific month in the future. Maybe using a pivot table.&lt;/P&gt;
&lt;P&gt;Unfortunately the salary is not available as a table with one row per month per employee. There are only timeframes listed.&lt;/P&gt;
&lt;P&gt;So I need to split a timeframe into single rows per month and employee. Most likely using "autogenerate" but don't know how to do that for more than one employee. See example below.&lt;/P&gt;
&lt;P&gt;Person A receives a salary increase starting 01.01.2024. Person B is only valid for 4 months.&lt;/P&gt;
&lt;P&gt;So the salary cost forecast for 06/2023 would be 2000+3000=5000.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mg_gsi_da_0-1675253334743.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99413i0EE95F6F2BCBBC44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mg_gsi_da_0-1675253334743.png" alt="mg_gsi_da_0-1675253334743.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;How do I need to code the load script in Qlik Sense to do that?&lt;/P&gt;
&lt;P&gt;Regards Michael&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 12:15:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2032762#M85096</guid>
      <dc:creator>mg_gsi_da</dc:creator>
      <dc:date>2023-02-01T12:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Separate date timeframes into single rows ie. by month</title>
      <link>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2032983#M85116</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Table]:&lt;/P&gt;
&lt;P&gt;load *,&lt;BR /&gt;date(AddMonths(valid_from,iterno()-1),'MM/YYYY') as MonthYear&lt;BR /&gt;while date(valid_to)&amp;gt;=AddMonths(valid_from,iterno()-1) ;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;LOAD * INLINE &lt;BR /&gt;[&lt;BR /&gt;person,valid_from,valid_to,salary&lt;BR /&gt;A,01/02/2023,31/12/2023,2000&lt;BR /&gt;B,01/03/2023,30/06/2023,3000&lt;/P&gt;
&lt;P&gt;A,01/01/2024,28/02/2024,2200&lt;BR /&gt;A,01/01/2024,28/02/2024,2200&lt;BR /&gt;](delimiter is ',');&lt;/P&gt;
&lt;P&gt;Table :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brunobertels_0-1675272535290.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99476i67442C9F1C3F21CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brunobertels_0-1675272535290.png" alt="brunobertels_0-1675272535290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 17:29:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2032983#M85116</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2023-02-01T17:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Separate date timeframes into single rows ie. by month</title>
      <link>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2033140#M85125</link>
      <description>&lt;P&gt;Hi Bruno,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if I copy your code to the script it just returns an empty table with the columns of the Inline Load. No data is loaded.&lt;/P&gt;
&lt;P&gt;BUT: The reason was that we use the german date format dd.mm.yyyy. After I replaced the / with . it worked well&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thx a lot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 06:48:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Separate-date-timeframes-into-single-rows-ie-by-month/m-p/2033140#M85125</guid>
      <dc:creator>mg_gsi_da</dc:creator>
      <dc:date>2023-02-02T06:48:31Z</dc:date>
    </item>
  </channel>
</rss>

