Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Frank_Hartmann
Master II
Master II

filling up values

hello qv community,


my script looks like this:

------------------------------------------------------------------

1:

LOAD

RowNo() as Position_,

num(textbetween(@1,'<th rowspan="1" scope="row">','</th>')) as Jahr_

FROM

[Source]

2:

LOAD

RowNo()-1 as Position_,

textbetween(@1,'<td>','</td>') as Werte

FROM

[Source]

-------------------------------------------------------------------

Now I load a table with Position_, Jahr_, Werte in Qlikview

The Output looks like this:

Now I need all the year values to be filled up 5 rows upwards (for example:1997 also in Position_ :588-592

                                                                                                                       1996 also in Position_ :596-600)


Can somebody explain me how to setup the script?


Thx in advance for helping

1 Solution

Accepted Solutions
sujeetsingh
Master III
Master III

You can play with Previous function to achieve your need.

View solution in original post

2 Replies
sujeetsingh
Master III
Master III

You can play with Previous function to achieve your need.

prieper
Master II
Master II

Think that previous may not work, give it a try with  the below

BaseTable:

LOAD ROWNO() AS Pos, * INLINE [Jahr, Werte

  , 5

  , 6

  , 7

  2010, 2

  , 1

  , 2

  , 3

  2011, 1];

Table:

NOCONCATENATE LOAD

  Pos,

  Werte,

  IF(LEN(TRIM(Jahr)) = 0, PEEK('Jahr', -1), Jahr) AS Jahr

RESIDENT

  BaseTable

ORDER BY

  Pos DESC;

DROP TABLE BaseTable;

HTH Peter