<?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 Seperate Amount between two given dates and sharing the amount equally between qtrs in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1750852#M57791</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am new to QS and looking for some suggestions here.&lt;/P&gt;&lt;P&gt;I have a requirement a start date and end date fields and i need to generate quarters between these two dates and divide the amount equally between these quarters.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Start&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;TD&gt;1/1/2019&lt;/TD&gt;&lt;TD&gt;2/1/2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10000&lt;/TD&gt;&lt;TD&gt;1/8/2020&lt;/TD&gt;&lt;TD&gt;5/3/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;TD&gt;7/8/2020&lt;/TD&gt;&lt;TD&gt;8/8/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;6000&lt;/TD&gt;&lt;TD&gt;8/6/2021&lt;/TD&gt;&lt;TD&gt;8/6/2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;TD&gt;10/1/2019&lt;/TD&gt;&lt;TD&gt;10/1/2023&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to First Generate Quarters between these two dates. After generating quarters i want to sum up the each Qtr share for these 5 IDs and want to know how much i will be paying out each qtr. (like&amp;nbsp; forecasting. )&lt;/P&gt;&lt;P&gt;Also Please help me on how to show this in a line chart&lt;/P&gt;&lt;P&gt;Thank you all for your help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 20:40:00 GMT</pubDate>
    <dc:creator>Kumar_Reddy</dc:creator>
    <dc:date>2020-10-08T20:40:00Z</dc:date>
    <item>
      <title>How to Seperate Amount between two given dates and sharing the amount equally between qtrs</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1750852#M57791</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am new to QS and looking for some suggestions here.&lt;/P&gt;&lt;P&gt;I have a requirement a start date and end date fields and i need to generate quarters between these two dates and divide the amount equally between these quarters.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Start&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;TD&gt;1/1/2019&lt;/TD&gt;&lt;TD&gt;2/1/2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;10000&lt;/TD&gt;&lt;TD&gt;1/8/2020&lt;/TD&gt;&lt;TD&gt;5/3/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3000&lt;/TD&gt;&lt;TD&gt;7/8/2020&lt;/TD&gt;&lt;TD&gt;8/8/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;6000&lt;/TD&gt;&lt;TD&gt;8/6/2021&lt;/TD&gt;&lt;TD&gt;8/6/2023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;5000&lt;/TD&gt;&lt;TD&gt;10/1/2019&lt;/TD&gt;&lt;TD&gt;10/1/2023&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to First Generate Quarters between these two dates. After generating quarters i want to sum up the each Qtr share for these 5 IDs and want to know how much i will be paying out each qtr. (like&amp;nbsp; forecasting. )&lt;/P&gt;&lt;P&gt;Also Please help me on how to show this in a line chart&lt;/P&gt;&lt;P&gt;Thank you all for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 20:40:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1750852#M57791</guid>
      <dc:creator>Kumar_Reddy</dc:creator>
      <dc:date>2020-10-08T20:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Seperate Amount between two given dates and sharing the amount equally between qtrs</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1750939#M57805</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/52523"&gt;@Kumar_Reddy&lt;/a&gt;&amp;nbsp; like ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;QuartersMap:

MAPPING LOAD 

rowno() as Month,

'Q' &amp;amp; Ceil (rowno()/3) as Quarter

AUTOGENERATE (12);

Data:

LOAD ID, Amount, Date#(Start,'D/M/YYYY') as Start, Date#(End,'D/M/YYYY')  as End INLINE [
    ID, Amount, Start, End
    1, 5000, 1/1/2019, 2/1/2023
    2, 10000, 1/8/2020, 5/3/2025
    3, 3000, 7/8/2020, 8/8/2024
    4, 6000, 8/6/2021, 8/6/2023
    5, 5000, 10/1/2019, 10/1/2023
];
left join load  ID, Amount,ApplyMap('QuartersMap', month(Date(Start + IterNo() - 1)), Null())&amp;amp;'_'&amp;amp;Year(Date(Start + IterNo() - 1)) as Quarter

 resident Data
While (Start + IterNo() -1) &amp;lt;= End;


Tmp:
noconcatenate

load distinct * resident Data;

drop table Data;

Final:
noconcatenate

load  * resident Tmp;
left join 

load   ID,Start, End,count(Quarter) as countQuarter resident Tmp group by ID,Start, End;

drop table Tmp;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and in chart&lt;/P&gt;&lt;P&gt;Dimention ID,Start,ENd&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;Max(Amount)---&amp;gt; for Total Amoun&lt;/P&gt;&lt;P&gt;Max(Amount)/countQuarter ---&amp;gt; for Amount by Quarter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 650px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/41962iB78B5190AAFD834F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 08:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1750939#M57805</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-09T08:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Seperate Amount between two given dates and sharing the amount equally between qtrs</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1751081#M57816</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;I need the Quarter to be shown up as header linke Q3 2019,Q4 2019,Q1 2020,Q2 2020 and below the amounts. I think we need to do this using pivot table so that the amounts can be seperated by each qtr. But i need to total payout of each qtr. Because each qtr payout will be different as they start at different dates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1751081#M57816</guid>
      <dc:creator>Kumar_Reddy</dc:creator>
      <dc:date>2020-10-09T13:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to Seperate Amount between two given dates and sharing the amount equally between qtrs</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1751084#M57817</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/52523"&gt;@Kumar_Reddy&lt;/a&gt;&amp;nbsp; can you share the expceted (vizulisation)?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 13:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-Seperate-Amount-between-two-given-dates-and-sharing-the/m-p/1751084#M57817</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-10-09T13:26:30Z</dc:date>
    </item>
  </channel>
</rss>

