Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following data loaded into qlikview:
Year ID Value
2012 A 100
2012 B 150
2013 A 110
2013 B 140
I want to generate yearly QVDs based on the above data. e.g. in the above example there would be two QVDs generated Sample_2012.qvd and Sample_2013.qvd
Hi,
Try putting
where Year = $(i)
Regards
KC
Hi,
If want dynamic then write like this way with for loop
A:
LOAD * INLINE [
Year, ID, Value
2012, A, 100
2012, B, 150
2013, A, 110
2013, B, 140
2014, C, 158
2015, D, 458
];
MinMax:
LOAD Min(Year) as YMin, Max(Year) as YMax Resident A;
LET vMinYear = Peek('YMin', 0, 'MinMax');
LET vMaxYear = Peek('YMax', 0, 'MinMax');
For i = vMinYear to vMaxYear
Temp:
NoConcatenate
load * Resident A where Year = $(i);
STORE * from Temp into Sample_$(i).qvd; //Sample_2013
Drop table Temp;
Next
Regards
Anand