This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
QlikView documentation and resources.
LOAD * From Source;
YearCount:LOAD Year as TotYr Resident Source; LET vYearMin = Peek('TotYr',0,'YearCount');LET vYearMax = Peek('TotYr',-1,'YearCount');
Drop Table YearCount;
Drop Table Source;
FOR vTableName = $(vYearMin) to $(vYearMax) ////////// NoConcatenate $(vTableName):
LOAD * From Source.qvd (Qvd) Where Year = $(vTableName); STORE $(vTableName) into $(vTableName).qvd;
DROP Table $(vTableName);
Or May be used Order By or Distinct in the table load but already used Peek function.
LOAD Year as TotYr Resident Source Order By Year asc;
LOAD DISTINCT Year as TotYr Resident Source Order By Year asc;
Any suggestion is appreciated.
thanks nice code.what is the use case scnarios for this.could you please give example.
very nice A
Great, thanks for this
Thank you Anand..It is really helpful.
You can use yearly QVD's when you have some apps that only need 1 or two years data, and others that need all data, or your app only needs the last 5 years data. This way your app can be set to only load the qvds that are required rather than all data.
Thank you very much for provide this.
Thanks for this Anand!
A quick question... in the example you have:
LET vYearMin = Peek('TotYr',0,'YearCount');LET vYearMax = Peek('TotYr',-1,'YearCount');
If my understanding is correct, this code is setting variables vYearMin with the value of the first record and vYearMax with the value of the last record from the source respectively. So if that's the case one needs to make sure the column Year is sorted in an ascending way in the source for this to work properly, is that right?
Yes for that we need to use
Peek is fetching first and last value in vYearMin and vYearMax
LET vYearMin = Peek('TotYr',0,'YearCount'); -----Min Year
LET vYearMax = Peek('TotYr',-1,'YearCount'); -----Max Year
TotYryear is the fieldname where suppose values are as below
LET vYearMin = Peek('TotYr',0,'YearCount'); -----2000 to variable vYearMin
LET vYearMax = Peek('TotYr',-1,'YearCount');-----2014 to variable vYearMax
if it is sorted in ascending order
and vice veresa if in opposite order
thats why before using peek first make sure sorting ascending and then use peek