Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone. I'm Christian, a Qlik newbie, and this is my first question
I have several days in a qvd file, have no problems to obtain maximun and minimun dates, and number of days between that dates
What I want to do is a loop that goes from 0 to that number of days. But I'm making something wrong. The loop always exits because of the 'if' condition rather than 'for' condition.
What I'm doing worng? Thanks in advance
cotas:
LOAD
min(Date(Floor(FechaAlta))) as minimo,
max(Date(Floor(FechaAlta))) as maximo,
max(Date(Floor(FechaAlta)))-min(Date(Floor(FechaAlta))) as dias
Resident carga;
LET vDiasInFile = 'dias';
LET vPasesInFile = 0;
for vI = 0 to '$(vDiasInFile)'
vPasesInFile = vPasesInFile + 1;
IF vI >= 10 then
EXIT For;
ENDIF
NEXT vI
Try this:
LET vDiasInFile = Peek('dias');
Tks sunny, will try and let you know!
It works. Tanks!!!