<?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: Data Reduction for 4 month in QVD data. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Data-Reduction-for-4-month-in-QVD-data/m-p/1864095#M71325</link>
    <description>&lt;P&gt;Hi, you can load a table with all the differnt values you want to keep for YearMonth, this values could be loaded from qvd or from another funtions, in example, to generate a date for the last 12 months:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD Date(MonthStart(AddMonths(Today(),-RecNo())),'YYYYMM') as YEARMONTH
AutoGenerate 12;&lt;/LI-CODE&gt;
&lt;P&gt;Then you can load load from qvd using exists to only load the values loaded in the first table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAd * From [qvd.qvd] Where exits(YEARMONTH);&lt;/LI-CODE&gt;
&lt;P&gt;And then store again the qvd.&lt;/P&gt;
&lt;P&gt;I would recommend to a backup of the qvd before testing, also note that filtering by exact dates may need both fields to be in the same format, so maybe it needs some adjustments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anthoer option would be load the diffreent values in the qvd, and use min or max to get the 4th value, and use this value in the where clause, like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmpYearMonth:
LOAd MIN(YEARMONTH,4) as YEARMONTH FROM [qvd.qvd](qvd);
LET vYearMonth = Peek('YEARMONTH',0,'tmpYearMonth');
DROP Table tmpYearMonth;

qvd:
LOAD * from [qvd.qvd](qvd) Where YEARMONTH&amp;gt;$(vYearMonth);&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 27 Nov 2021 08:22:34 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2021-11-27T08:22:34Z</dc:date>
    <item>
      <title>Data Reduction for 4 month in QVD data.</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Reduction-for-4-month-in-QVD-data/m-p/1863938#M71313</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;In my requirement we need to delete last&amp;nbsp; 4 month data in QVD&amp;nbsp; , but in QVD we have date format in YEARMONTH (202011)&lt;/P&gt;
&lt;P&gt;how can i restrict 4 month data based on YEARMONTH without additional field&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;scenario is need to delete last 4 month data in QVD and need to load those deleted 4 month data from table .&lt;/P&gt;
&lt;P&gt;Kindly help me on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 11:28:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Reduction-for-4-month-in-QVD-data/m-p/1863938#M71313</guid>
      <dc:creator>Lakshminarayanan_J</dc:creator>
      <dc:date>2021-11-26T11:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Data Reduction for 4 month in QVD data.</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Reduction-for-4-month-in-QVD-data/m-p/1864095#M71325</link>
      <description>&lt;P&gt;Hi, you can load a table with all the differnt values you want to keep for YearMonth, this values could be loaded from qvd or from another funtions, in example, to generate a date for the last 12 months:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD Date(MonthStart(AddMonths(Today(),-RecNo())),'YYYYMM') as YEARMONTH
AutoGenerate 12;&lt;/LI-CODE&gt;
&lt;P&gt;Then you can load load from qvd using exists to only load the values loaded in the first table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAd * From [qvd.qvd] Where exits(YEARMONTH);&lt;/LI-CODE&gt;
&lt;P&gt;And then store again the qvd.&lt;/P&gt;
&lt;P&gt;I would recommend to a backup of the qvd before testing, also note that filtering by exact dates may need both fields to be in the same format, so maybe it needs some adjustments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anthoer option would be load the diffreent values in the qvd, and use min or max to get the 4th value, and use this value in the where clause, like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;tmpYearMonth:
LOAd MIN(YEARMONTH,4) as YEARMONTH FROM [qvd.qvd](qvd);
LET vYearMonth = Peek('YEARMONTH',0,'tmpYearMonth');
DROP Table tmpYearMonth;

qvd:
LOAD * from [qvd.qvd](qvd) Where YEARMONTH&amp;gt;$(vYearMonth);&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 27 Nov 2021 08:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Reduction-for-4-month-in-QVD-data/m-p/1864095#M71325</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-11-27T08:22:34Z</dc:date>
    </item>
  </channel>
</rss>

