<?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: Show latest value based on the table-Rolling Forecast in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123188#M753254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Try this logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD Date,Product,Actual,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;20-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;21-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;22-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;23-10-2018]&lt;/P&gt;&lt;P&gt;FROM &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Rolling.xlsx &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(ooxml, embedded labels, table is Date);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR vCounter = 0 TO NoOfFields('Table') - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vCurrentField = FieldName($(vCounter), 'Table');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF WildMatch(vCurrentField, 'Forecast*') THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp; ForecastFields: LOAD '$(vCurrentField)' as FieldName, Date(Trim(SubField('$(vCurrentField)', Chr(13), 2))) as Date AUTOGENERATE 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;TempTable: LOAD 'If(Len(Trim([' &amp;amp; Concat(FieldName &amp;amp; '])) &amp;gt; 0, [' &amp;amp; FieldName &amp;amp; ']', ', If(Len(Trim([', -Date)&amp;nbsp; as ForecastFields Resident ForecastFields;&lt;/P&gt;&lt;P&gt;vString = Peek('ForecastFields', 0) &amp;amp; Repeat(')', NoOfRows('ForecastFields')) &amp;amp; 'as [Forecast]';&lt;/P&gt;&lt;P&gt;Table2: LOAD *, $(vString) Resident Table; DROP Tables Table, TempTable, ForecastFields;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Oct 2018 16:55:12 GMT</pubDate>
    <dc:creator>andrey_krylov</dc:creator>
    <dc:date>2018-10-21T16:55:12Z</dc:date>
    <item>
      <title>Show latest value based on the table-Rolling Forecast</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123187#M753253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to show the latest forecast value using qlikview. I will be getting forecast for everyday but i want to map latest forecast date with the actual using dates&lt;/P&gt;&lt;P&gt;The logic is, the forecast should be mapped based on the forecast date and actual date in the load script?&lt;/P&gt;&lt;P&gt;Can any one help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708" target="_blank"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="216387" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/216387_Capture.JPG" style="height: 348px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123187#M753253</guid>
      <dc:creator>sathish_kumar</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest value based on the table-Rolling Forecast</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123188#M753254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. Try this logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD Date,Product,Actual,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;20-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;21-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;22-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;23-10-2018]&lt;/P&gt;&lt;P&gt;FROM &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Rolling.xlsx &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(ooxml, embedded labels, table is Date);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR vCounter = 0 TO NoOfFields('Table') - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; vCurrentField = FieldName($(vCounter), 'Table');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF WildMatch(vCurrentField, 'Forecast*') THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp; ForecastFields: LOAD '$(vCurrentField)' as FieldName, Date(Trim(SubField('$(vCurrentField)', Chr(13), 2))) as Date AUTOGENERATE 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;TempTable: LOAD 'If(Len(Trim([' &amp;amp; Concat(FieldName &amp;amp; '])) &amp;gt; 0, [' &amp;amp; FieldName &amp;amp; ']', ', If(Len(Trim([', -Date)&amp;nbsp; as ForecastFields Resident ForecastFields;&lt;/P&gt;&lt;P&gt;vString = Peek('ForecastFields', 0) &amp;amp; Repeat(')', NoOfRows('ForecastFields')) &amp;amp; 'as [Forecast]';&lt;/P&gt;&lt;P&gt;Table2: LOAD *, $(vString) Resident Table; DROP Tables Table, TempTable, ForecastFields;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2018 16:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123188#M753254</guid>
      <dc:creator>andrey_krylov</dc:creator>
      <dc:date>2018-10-21T16:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest value based on the table-Rolling Forecast</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123189#M753255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forecasts:&lt;/P&gt;&lt;P&gt;LOAD Date,Product,Actual,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;20-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;21-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;22-10-2018],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Forecast&lt;/P&gt;&lt;P&gt;23-10-2018]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Rolling.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Date);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CROSSTABLE (ForecastDate, Value,3)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;Resident Forecasts;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Forecasts)&lt;/P&gt;&lt;P&gt;LOAD Date,Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;FirstSortedValue(Value, -Right(ForecastDate,10))&lt;/STRONG&gt; as [Forecast Desired Output]&lt;/P&gt;&lt;P&gt;Resident TMP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group BY Date,Product;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Oct 2018 20:36:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123189#M753255</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-10-21T20:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Show latest value based on the table-Rolling Forecast</title>
      <link>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123190#M753256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 09:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-latest-value-based-on-the-table-Rolling-Forecast/m-p/123190#M753256</guid>
      <dc:creator>sathish_kumar</dc:creator>
      <dc:date>2018-10-22T09:23:35Z</dc:date>
    </item>
  </channel>
</rss>

