<?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 Forecast Calculation in Qlikview in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Forecast-Calculation-in-Qlikview/m-p/1805044#M65407</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am trying to do a quarterly/monthly/yearly forecast of Contracts data. This query is about Quarterly forecast.&lt;/P&gt;&lt;P&gt;The fields available are Frequency= (MTH/YR/QTR), Offset_Months=(Precalculated field--values like , 1,0,-1,3 etc),&lt;BR /&gt;Next_Due_Date a Date field(values like - 01/08/2021,01/07/22 etc).&lt;/P&gt;&lt;P&gt;I need to create 48 expression as the forecasting needs to be for 4 years and the forecast table always start from the next month of the current date. Screenshot of sample table below.&lt;/P&gt;&lt;P&gt;Label of the 48 expressions are..&lt;BR /&gt;Date((addmonths(Today(),1)),'MMM-YY'),Date((addmonths(Today(),2)),'MMM-YY') .....Date((addmonths(Today(),48)),'MMM-YY')&lt;/P&gt;&lt;P&gt;Now for Quarterly calculation based on the Next Due date and offset Months, I have to decide the starting month and drop in the unit price. (Unit Price predefined field QVD)&lt;/P&gt;&lt;P&gt;For e.g if the Next Due Date is 01/08/2021 and offset Months is -1, I have to start forecasting at JuLy -21 and drop in the unit price(predefined field) for that specific Contract line.&lt;/P&gt;&lt;P&gt;Expression I am using to determine this is below:&lt;/P&gt;&lt;P&gt;if(&lt;BR /&gt;date(addmonths([CONTRACT_LINES.Next_Due],[CONTRACT_LINES.Offset_Mnth]),'MMM-YY')=&lt;BR /&gt;date(addmonths(Monthstart(Today()),1),'MMM-YY')&lt;BR /&gt;and (Date((addmonths(Today(),1)),'MMM-YY') - Date(Today(),'MMM-YY')&amp;lt;=[Remaining_Days])&lt;BR /&gt;,[Unit Price]...&lt;/P&gt;&lt;P&gt;Remaining_Days = Pre calculated field to determine till which year-month the Contract Line should be forecasted.&lt;BR /&gt;For e.g if it is 365 , forecasting should only be for 1 year , if it is 700 forecasting should be for 2 years... etc. Can be ignored for the time being.&lt;/P&gt;&lt;P&gt;Using the above calculation , I have been able to find out the starting month for forecast.&lt;BR /&gt;Now based on the Starting Month, in case of quarterly forecast, the next forecast will be Starting Month + 3,So if the starting month was&lt;BR /&gt;Jun 21 next forecast will Sep-21, and then the next one will be Dec-21. If the starting Month is Jul-21, next forecast will be Oct-21 and the next one Jan-22.. in this way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not sure how to achieve this . Can you please help me in developing an expression for the above case?&lt;/P&gt;&lt;P&gt;Sample data for Quarterly Calculation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankhi_0-1620137401701.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54231iF977D56F76A73472/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankhi_0-1620137401701.png" alt="Ankhi_0-1620137401701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 May 2021 14:11:50 GMT</pubDate>
    <dc:creator>Ankhi</dc:creator>
    <dc:date>2021-05-04T14:11:50Z</dc:date>
    <item>
      <title>Forecast Calculation in Qlikview</title>
      <link>https://community.qlik.com/t5/App-Development/Forecast-Calculation-in-Qlikview/m-p/1805044#M65407</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I am trying to do a quarterly/monthly/yearly forecast of Contracts data. This query is about Quarterly forecast.&lt;/P&gt;&lt;P&gt;The fields available are Frequency= (MTH/YR/QTR), Offset_Months=(Precalculated field--values like , 1,0,-1,3 etc),&lt;BR /&gt;Next_Due_Date a Date field(values like - 01/08/2021,01/07/22 etc).&lt;/P&gt;&lt;P&gt;I need to create 48 expression as the forecasting needs to be for 4 years and the forecast table always start from the next month of the current date. Screenshot of sample table below.&lt;/P&gt;&lt;P&gt;Label of the 48 expressions are..&lt;BR /&gt;Date((addmonths(Today(),1)),'MMM-YY'),Date((addmonths(Today(),2)),'MMM-YY') .....Date((addmonths(Today(),48)),'MMM-YY')&lt;/P&gt;&lt;P&gt;Now for Quarterly calculation based on the Next Due date and offset Months, I have to decide the starting month and drop in the unit price. (Unit Price predefined field QVD)&lt;/P&gt;&lt;P&gt;For e.g if the Next Due Date is 01/08/2021 and offset Months is -1, I have to start forecasting at JuLy -21 and drop in the unit price(predefined field) for that specific Contract line.&lt;/P&gt;&lt;P&gt;Expression I am using to determine this is below:&lt;/P&gt;&lt;P&gt;if(&lt;BR /&gt;date(addmonths([CONTRACT_LINES.Next_Due],[CONTRACT_LINES.Offset_Mnth]),'MMM-YY')=&lt;BR /&gt;date(addmonths(Monthstart(Today()),1),'MMM-YY')&lt;BR /&gt;and (Date((addmonths(Today(),1)),'MMM-YY') - Date(Today(),'MMM-YY')&amp;lt;=[Remaining_Days])&lt;BR /&gt;,[Unit Price]...&lt;/P&gt;&lt;P&gt;Remaining_Days = Pre calculated field to determine till which year-month the Contract Line should be forecasted.&lt;BR /&gt;For e.g if it is 365 , forecasting should only be for 1 year , if it is 700 forecasting should be for 2 years... etc. Can be ignored for the time being.&lt;/P&gt;&lt;P&gt;Using the above calculation , I have been able to find out the starting month for forecast.&lt;BR /&gt;Now based on the Starting Month, in case of quarterly forecast, the next forecast will be Starting Month + 3,So if the starting month was&lt;BR /&gt;Jun 21 next forecast will Sep-21, and then the next one will be Dec-21. If the starting Month is Jul-21, next forecast will be Oct-21 and the next one Jan-22.. in this way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not sure how to achieve this . Can you please help me in developing an expression for the above case?&lt;/P&gt;&lt;P&gt;Sample data for Quarterly Calculation:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankhi_0-1620137401701.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54231iF977D56F76A73472/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankhi_0-1620137401701.png" alt="Ankhi_0-1620137401701.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 14:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forecast-Calculation-in-Qlikview/m-p/1805044#M65407</guid>
      <dc:creator>Ankhi</dc:creator>
      <dc:date>2021-05-04T14:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Forecast Calculation in Qlikview</title>
      <link>https://community.qlik.com/t5/App-Development/Forecast-Calculation-in-Qlikview/m-p/1805046#M65408</link>
      <description>&lt;P&gt;The Qlikview table structure looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ankhi_0-1620137707539.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54233iDD9D98E246E4E2F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ankhi_0-1620137707539.png" alt="Ankhi_0-1620137707539.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 14:15:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forecast-Calculation-in-Qlikview/m-p/1805046#M65408</guid>
      <dc:creator>Ankhi</dc:creator>
      <dc:date>2021-05-04T14:15:21Z</dc:date>
    </item>
  </channel>
</rss>

