Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Please provide solution on to generate multiple QVD on year basis.2013 related data into 2013.qvd and 2014 relates data in 2014.qvd
i.e., Jan-1-2013 to Dec-31-2013 as 2013.qvd and Jan-1-2014 to Dec-31-2014 as 2014.qvd
Tried below script
temp:
load max([Monthstart_Sale]) as period Resident $(SALES_Table);
let vperiodcheck=peek('period',0,'temp');
let vlastyear=year(today())-1;
//let vCurrentyear= Year(Yearstart( Today()));
LET vCurrentyear = num(Year(today()));
If month($(vperiodcheck))=1
store Sales into sales$(vlastyear).qvd(qvd);
ELSEIF
store Sales into sales_Previous_$(vcurrentyear).qvd(qvd);
EXIT Script;
But unfortunately getting sales$(vlastyear).qvd i.e.,2013.qvd with jan-nov not getting dec data
and not able to getting 2014.qvd
Below is error log:
12/6/2014 12:40:43 AM: 0717 temp:
12/6/2014 12:40:43 AM: 0718 load max([Monthstart_Sale]) as period Resident Sales
12/6/2014 12:40:43 AM: 1 fields found: period, 1 lines fetched
12/6/2014 12:40:43 AM: 0721 let vperiodcheck=peek('period',0,'temp')
12/6/2014 12:40:43 AM: 0722 let vlastyear=year(today())-1
12/6/2014 12:40:43 AM: 0724 LET vCurrentyear = Num(today())
12/6/2014 12:40:43 AM: 0728 If month(41974)=1
12/6/2014 12:40:43 AM: Error: Script line error:
12/6/2014 12:40:43 AM: 0729 store Sales into sales_2013.qvd(qvd)
12/6/2014 12:40:43 AM: 0730 ELSEIF
12/6/2014 12:40:43 AM: Error: Script line error:
12/6/2014 12:40:43 AM: 0732 store Sales into sales_Previous_.qvd(qvd)
12/6/2014 12:40:43 AM: 0736 EXIT Script
12/6/2014 12:40:43 AM: Execution finished.
please do needful.Thanks
Hi
either you may generate monthwise data, or you load two qvd's (one for each year) and do the selection/filtering on basis monthes during the load.
HTH
Peter
Can any one has solution on below thread
http://community.qlik.com/message/675483#675483
For getting Year wise QVD below script worked .Thanks for all your Solutions.
temp:
load max([Monthstart_Sales]) as period Resident $(Sale_Table);
let vperiodcheck=peek('period',0,'temp');
let vlastyear=year(today())-1;
let vCurrentyear=year(today());
if num(month($(vperiodcheck)))=1 then;
TEMP1:
NoConcatenate LOAD * Resident $( Sale_Table)
where [Monthstart_Sales]<YearStart(Today());
store TEMP1 into Sale_previous_$(vlastyear).qvd(qvd);
drop Table TEMP1;
ELSE
TEMP1:
NoConcatenate LOAD * Resident $( Sale_Table)
where [Monthstart_Sales]>=YearStart(Today());
store TEMP1 into Sale_current_$(vCurrentyear).qvd(qvd);
drop Table TEMP1;
How To get Rolling 12 months of data from Accounting Period of each Financial QVD
Any solution on Thread For QVD Generators Year wise QVD Got.
Now need to Load QVD in Finall Application to filter only 12 months of data from present Month