Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Propagate values in QlikView column

Maybe like this:

LOAD

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

FROM ...;

3 Replies
MVP
MVP

Re: Propagate values in QlikView column

Maybe like this:

LOAD

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

FROM ...;

kumarnatarajan
Valued Contributor

Re: Propagate values in QlikView column

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

Re: Propagate values in QlikView column

Worked like a charm. Thanks guys

Community Browser