Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

value in one column equals to value 1 row after in another column

Hi, how can I have column B take the value of the day after?:

DateAB
1-Jun1410
2-Jun107
3-Jun735
4-Jun3524
5-Jun2432
6-Jun32


Thanks.

8 Replies
nagaiank
Valued Contributor III

Re: value in one column equals to value 1 row after in another column

Use the following script to get the data in the table box shown below:

Table1:

LOAD RowNo() as ID, * Inline [

A

14

10

7

35

24

32

];

Table2:

LOAD ID, A, Peek(A) as B

Resident Table1 Order By ID desc;

Capture.PNG.png

anbu1984
Honored Contributor III

Re: value in one column equals to value 1 row after in another column

Table1:

LOAD * Inline [

A

14

10

7

35

24

32

];

Table2:

LOAD A,Peek(A,RecNo(),'Table1') as B

Resident Table1 ;

Not applicable

Re: value in one column equals to value 1 row after in another column

Hi,

Check the attached app if you want to handle it from the expression level.

Regrads,

Ravikumar

senpradip007
Valued Contributor III

Re: value in one column equals to value 1 row after in another column

Use Below() function. Hope you will get your desire result.

Not applicable

Re: value in one column equals to value 1 row after in another column

Hi, so sorry can you screenshot? I can only open files that I create myself. Thanks.

MVP
MVP

Re: value in one column equals to value 1 row after in another column

source:

LOAD Date, A, B

FROM [http://community.qlik.com/thread/134649] (html, codepage is 1252, embedded labels, table is @1);

final:

noconcatenate

load   Date, A,

  peek(A) as B

Resident

  source

order by Date desc;

drop table source;

Not applicable

Re: Re: value in one column equals to value 1 row after in another column

Hi,

Create the chart like this

Straight Table:

Dim : Date

Exp1: Sum(A)   (Column Label A)

Exp2: Below(A) (Column Label B)

Here is the screen shot of the chart in the attached SampleApp of my earlier post.

Chart.PNG.png

Regards,

Ravikumar

Re: value in one column equals to value 1 row after in another column

tabInput:

LOAD Date, A

FROM [http://community.qlik.com/thread/134649] (html, codepage is 1252, embedded labels, table is @1);


Left Join

LOAD Date,

            Previous(A) as B

Resident tabInput

Order By Date desc;

Community Browser