Discussion Board for collaboration on QlikView Scripting.
Because this script just a record breaking quantities of parts?
load * inline[
LET X = peek('PARCELAS');
LET Z = peek('DATA');
FOR i = 1 to $(x)
load * inline
Go to Solution.
did you mean this?
tmp:load * inline [DATA, PARCELAS'11/10/2011',20'21/10/2011',7];Counts:LOAD Count(PARCELAS) as YResident tmp;LET y = Peek('Y', 0) - 1;DROP Table Counts;for k = 0 to $(y) LET x = peek('PARCELAS', $(k)); LET z = peek('DATA', $(k)); FOR i = 1 to $(x) load * inline [ DATA, PARCELAS $(z),$(i) ]; next iNEXT k
But be aware about duplication of two first records.
Can anyone help?
What do you mean with break?
Which is your desired result? Maybe if you are more specific, we can help you easily.
This is what you get right now. Right?
Exactly.This is what I have now.You can observe that the value did not break 20.My table is comprised of several records with different field plots.In my example, I posted only two record, just one more record breaking obeyed.
Sorry Washington, I still don't get you when you say "the value did not break 20" ¿?
Could you put an example of your desired result, like I showed you my final table result before?
Beauty, solved my problem.Thanks.
I change the script for not duplicate.
Datas:load * inline [DATA, PARCELAS'11/10/2011',20'21/10/2011',7];FOR k = 0 TO (NoOfRows('Datas')-1) LET data = peek('DATA', $(k)); LET parcela = peek('PARCELAS', $(k)); FOR i = 1 to ($(parcela)-1) load Date('$(data)') as DATA, '$(i)' as PARCELAS Autogenerate(1); NEXT iNEXT k
Fernando,Because in your example the second record did not break like the original?
I did a test here and it worked properly.
Following is the table with the data.