<?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: Create Monthly Snapshot qvd in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1760541#M454022</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/122016"&gt;@Ramsingh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After the first load, try like below&lt;/P&gt;&lt;P&gt;let vQvdAvailable = not Isnull(QvdCreateTime('Products.qvd'));&lt;/P&gt;&lt;P&gt;If $(vQvdAvailable) =-1 then&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;FinalProd:&lt;BR /&gt;LOAD * From Products.qvd(qvd);&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Product:&lt;BR /&gt;Load *, Date(Today()+15) as LoadDate Inline&lt;BR /&gt;[&lt;BR /&gt;ProductID&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;6&lt;BR /&gt;] Where not Exists(ProductID);&lt;/P&gt;&lt;P&gt;Store FinalProd into Products.qvd(qvd);&lt;/P&gt;&lt;P&gt;DROP Table FinalProd;&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2020 06:20:59 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2020-11-11T06:20:59Z</dc:date>
    <item>
      <title>Create Monthly Snapshot qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1758392#M453888</link>
      <description>&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;How do i create Monthly Snapshot .&lt;/P&gt;&lt;P&gt;Example : I have Product ID in Table ( only 1 field ) and when i refresh for the first time ie Today , i want new field to be created telling the Refresh time ( Year and Month ) and store it to qvd with Name the qvd as "Product 2020 nov" and when refresh the source again next time i want the new Products ( 4, 5 , 6 ) to be tagged as refresh time ( next month ) - 12/4/2020 and again store the qvd telling "Product 2020 Dec" and so on every Month.&lt;/P&gt;&lt;P&gt;Hope I'm clear&lt;/P&gt;&lt;P&gt;Product ID&amp;nbsp; &amp;nbsp; &amp;nbsp; OutPut Field Required&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11/4/2020&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11/4/2020&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;11/4/2020&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12/4/2020&lt;/P&gt;&lt;P&gt;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12/4/2020&lt;/P&gt;&lt;P&gt;6&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12/4/2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advance Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 11:29:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1758392#M453888</guid>
      <dc:creator>Ramsingh</dc:creator>
      <dc:date>2020-11-04T11:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create Monthly Snapshot qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1759114#M453931</link>
      <description>&lt;P&gt;there are two components to this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. a complete list of what has been loaded&lt;BR /&gt;2. monthly QVDs for new ones loaded for the month&lt;BR /&gt;&lt;BR /&gt;the logic is load everything from the complete list QVD, get a list of new products and stamp with today's date&lt;BR /&gt;then check if the current month qvd exists: store else load it, add the new ones, store&lt;BR /&gt;of course update the complete list with the new ones&lt;BR /&gt;&lt;BR /&gt;this is the quick and dirty just to give you an idea and im sure it can be optimized&lt;/P&gt;&lt;P&gt;Prior to the run:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1604610600417.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/43666i293C0865CE594D26/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1604610600417.png" alt="edwin_0-1604610600417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is after adding H, I to the inline:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_1-1604610668659.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/43667i410B6B48453430DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_1-1604610668659.png" alt="edwin_1-1604610668659.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

LoadedProducts:
//this is for first time run
//load * inline [
//Product, Date
//A, 10/1/2020
//B, 10/1/2020
//];
load * from AllProducts.qvd (qvd);

NoConcatenate
Products:
load NewProduct, date(Today(),'M/D/YYYY') as LoadDate
where not exists(Product, NewProduct)
;
load * inline [
NewProduct
A
B
C
D
E
F
G
];


concatenate(LoadedProducts)
load NewProduct as Product, LoadDate as Date Resident Products;


STore LoadedProducts into AllProducts.qvd;

let vThisMonth=date(Today(),'MMM-YYYY');

LET vListqvdexists=isnull(QvdCreateTime('$(vThisMonth).qvd'));

if $(vListqvdexists)=-1 then
	store Products into [$(vThisMonth).qvd];
ELSE
	NoConcatenate
	tmpProducts:
	load NewProduct as tempProduct, date(LoadDate,'M/D/YYYY') as LoadDate from [$(vThisMonth).qvd] (qvd);
	
	Concatenate (tmpProducts)
	load NewProduct as tempProduct, date(LoadDate,'M/D/YYYY') as LoadDate Resident Products where not exists(tempProduct, NewProduct);
	
	NoConcatenate
	ToSaveProducts:
	load tempProduct as NewProduct, date(LoadDate,'M/D/YYYY') as LoadDate Resident tmpProducts;
	
	store ToSaveProducts into [$(vThisMonth).qvd];
	
	drop tables tmpProducts, ToSaveProducts;
ENDIF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 21:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1759114#M453931</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-11-05T21:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create Monthly Snapshot qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1760531#M454021</link>
      <description>&lt;P&gt;Hi Edwin ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying .&lt;/P&gt;&lt;P&gt;Can I make it simpler .&lt;/P&gt;&lt;P&gt;How can I achieve this ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically instead of having qvd for each time I refresh .&lt;/P&gt;&lt;P&gt;Can I have one qvd only with refresh date as new field .&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;date&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; &amp;nbsp;If I refresh today , I shud get today date&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; If I refresh today , I shud get today date&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say tomor I have any new data in the table so when I refresh , for those new data I shud have refresh date as today date's stored in same qvd ( with existing date - yesterday s data )&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope iam clear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 04:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1760531#M454021</guid>
      <dc:creator>Ramsingh</dc:creator>
      <dc:date>2020-11-11T04:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create Monthly Snapshot qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1760541#M454022</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/122016"&gt;@Ramsingh&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After the first load, try like below&lt;/P&gt;&lt;P&gt;let vQvdAvailable = not Isnull(QvdCreateTime('Products.qvd'));&lt;/P&gt;&lt;P&gt;If $(vQvdAvailable) =-1 then&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;FinalProd:&lt;BR /&gt;LOAD * From Products.qvd(qvd);&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Product:&lt;BR /&gt;Load *, Date(Today()+15) as LoadDate Inline&lt;BR /&gt;[&lt;BR /&gt;ProductID&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;5&lt;BR /&gt;6&lt;BR /&gt;] Where not Exists(ProductID);&lt;/P&gt;&lt;P&gt;Store FinalProd into Products.qvd(qvd);&lt;/P&gt;&lt;P&gt;DROP Table FinalProd;&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 06:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-Monthly-Snapshot-qvd/m-p/1760541#M454022</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-11-11T06:20:59Z</dc:date>
    </item>
  </channel>
</rss>

