<?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 How to convert month lines to day lines in a script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494308#M102422</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a datasource with the following columns&lt;BR /&gt;Date, Budget (in euro)&lt;BR /&gt;1/8/2024,1000&lt;BR /&gt;1/9/2024,1500&lt;BR /&gt;1/10/2024,2000&lt;BR /&gt;The date is the first day of that month (DD/MM/YYYY). The amount is a total budget amount for that month&lt;/P&gt;
&lt;P&gt;Now I want to load this data in a script and generate lines PER DAY.&lt;BR /&gt;So the end result of the table after executing the script should be&lt;/P&gt;
&lt;P&gt;Date, Budget&lt;BR /&gt;1/8/2024, 32.26 (Calculated as 1000/31 as august has 31 days)&lt;BR /&gt;2/8/2024, 32.26&lt;BR /&gt;3/8/2024, 32.26&lt;BR /&gt;31/8/2024, 32.26&lt;BR /&gt;1/9/2024, 50 (calculated as 1500 / 30 as september has 30 days)&lt;BR /&gt;etc.&lt;BR /&gt;How do I do that?&lt;/P&gt;</description>
    <pubDate>Sat, 23 Nov 2024 19:07:03 GMT</pubDate>
    <dc:creator>SupportActiveProfessionals</dc:creator>
    <dc:date>2024-11-23T19:07:03Z</dc:date>
    <item>
      <title>How to convert month lines to day lines in a script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494308#M102422</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a datasource with the following columns&lt;BR /&gt;Date, Budget (in euro)&lt;BR /&gt;1/8/2024,1000&lt;BR /&gt;1/9/2024,1500&lt;BR /&gt;1/10/2024,2000&lt;BR /&gt;The date is the first day of that month (DD/MM/YYYY). The amount is a total budget amount for that month&lt;/P&gt;
&lt;P&gt;Now I want to load this data in a script and generate lines PER DAY.&lt;BR /&gt;So the end result of the table after executing the script should be&lt;/P&gt;
&lt;P&gt;Date, Budget&lt;BR /&gt;1/8/2024, 32.26 (Calculated as 1000/31 as august has 31 days)&lt;BR /&gt;2/8/2024, 32.26&lt;BR /&gt;3/8/2024, 32.26&lt;BR /&gt;31/8/2024, 32.26&lt;BR /&gt;1/9/2024, 50 (calculated as 1500 / 30 as september has 30 days)&lt;BR /&gt;etc.&lt;BR /&gt;How do I do that?&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2024 19:07:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494308#M102422</guid>
      <dc:creator>SupportActiveProfessionals</dc:creator>
      <dc:date>2024-11-23T19:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert month lines to day lines in a script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494326#M102424</link>
      <description>&lt;P&gt;G'day,&lt;/P&gt;
&lt;P&gt;There are a couple off ways to solve this. If you have a calendar table, you can left join the calendar into your data table and that will duplicate all the rows to the number of days in each month. If you don't have a calendar table, then you can use this strategy:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DailyBudget:
load Date + iterno() - 1 as [Daily Budget Date]
   , Budget / [Days In Month] as [Daily Budget]
while iterno() &amp;lt;= [Days In Month]
;
load Date
   , Budget 
   , floor( monthend( Date ) ) as [Days In Month]
resident MonthlyBudgetTable
;&lt;/LI-CODE&gt;
&lt;P&gt;I'm not sure if this code is perfect, but the gist of it is to use the monthend() function to find the days in the month and the 'load ... while ...' to iterate over the month.&lt;/P&gt;
&lt;P&gt;I hope this makes sense. Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 20:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494326#M102424</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2024-11-24T20:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert month lines to day lines in a script</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494328#M102425</link>
      <description>&lt;P&gt;maybe using&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;day( monthend( Date ) ) as [Days In Month]&lt;/LI-CODE&gt;
&lt;P&gt;instead&lt;/P&gt;</description>
      <pubDate>Sun, 24 Nov 2024 20:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-convert-month-lines-to-day-lines-in-a-script/m-p/2494328#M102425</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2024-11-24T20:38:56Z</dc:date>
    </item>
  </channel>
</rss>

