Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I need help to add one column in my script but I dont know how to do it.
Desired table/information:
I run the Loads and I want to add more information in this case the "Desired Column" aka Previous Points. This value corresponds to the last points from the Players.
I am doing something like this:
LOAD Points as PreviousPoints
Resident Data
// Where Day = Max(Date(Day)-1) and Player = ??
I have to work on the clause where. Do you have any suggestion how it should be like to put another column like the example?
Hello,
Look if it help.
you have to load (resident load) order by player, day and use the peek function to get the point of the previous record (only when the player of the previous record is the same)
Could you send it on .txt? I forgot to mention I dont have a lincense for the Qlikview at least until now.
Here is what jeanfilipedelle(Copy and Pasting as it is his script for you) did:
Within the script
TableAux:
LOAD * Inline [
Day,Player,Points
01-01-2012,A,10
01-01-2012,B,2
01-01-2012,C,3
01-01-2012,D,5
02-01-2012,A,1
02-01-2012,B,0
02-01-2012,C,5
02-01-2012,D,9
04-01-2012,A,5
04-01-2012,B,6
04-01-2012,C,8
04-01-2012,D,7
];
Table:
LOAD
*,
If(Peek(Player)=Player,Peek(Points)) as [Desired Column]
Resident TableAux
Order By Player,Day;
DROP Table TableAux;
Best,
S