Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Select precise data

Hi everyone, I need help to add one column in my script but I dont know how to do it.

Desired table/information:

table.bmp

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?

1 Solution

Accepted Solutions
Not applicable

Re: Select precise data

Hello,

Look if it help.

4 Replies
Not applicable

Re: Select precise data

Hello,

Look if it help.

maxgro
Not applicable

Re: Select precise data

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)

Not applicable

Re: Select precise data

Could you send it on .txt? I forgot to mention I dont have a lincense for the Qlikview at least until now.

sunny_talwar
Not applicable

Re: Select precise data

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