Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Propagate values in QlikView column

Hello fellow QV developers,

Consider the below table:

Test
A
B
C

New Column

Test
A
A
A
B
B
B
C
C
C
C

I'm asked to propogate values in column Test until there is a non-null value. For example, i would like to see A replicated until there is non-null value and B replicated until there is a non null etc.

Kindly guide me as to how i would write a script for such a requirement.

Cheers.

Thomas

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this:

LOAD

     if(len(trim(Test)),Test ,peek(Test) ) as Test

FROM ...;

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe like this:

LOAD

     if(len(trim(Test)),Test ,peek(Test) ) as Test

FROM ...;

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Use below ex. in your script.

Ex:

LOAD if(Len(Trim(Test))=0,Peek(Test),Test) as Test,SNo INLINE [

    Test,SNo

    A,1

    ,2

    ,3

    B,4

    ,5

    ,6

    C,7

    ,8

    ,9

];

Find the attached file.

Not applicable
Author

Worked like a charm. Thanks guys