Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Logic to use previous row issue

hi,

I have the following table

ColumnA     ColumnB     ColumnC     Question     SubQ         Answer

John              10.1.1.1     1/1/2016     Hello                               Hi

John              10.1.1.1     1/1/2016     Where        

John              10.1.1.1     1/1/2016                         is Home     Atlanta

John              10.1.1.1     1/1/2016                         is Work      Downtown

John              10.1.1.1     1/1/2016                         is School    Kennesaw

             

as you noticed on Question column.. sometime it might have sub questions and they are listed on the next rows and also the subQ is used.. 

I need to change the structure a little bit on the script side as follow

ColumnA     ColumnB     ColumnC     Question     SubQ       Answer

John              10.1.1.1     1/1/2016     Hello                            Good

John              10.1.1.1     1/1/2016     Where        is Home     Atlanta

John              10.1.1.1     1/1/2016     Where        is Work      Downtown

John              10.1.1.1     1/1/2016     Where        is School    Kennesaw

3 Replies
albertovarela
Partner - Specialist
Partner - Specialist

take a look at this post Generating Missing Data In QlikView

aarkay29
Specialist
Specialist

Something like this would work


If(ColumnA=peek(ColumnA),

     If(ISNULL(Question),

          If(ISNULL(peek(Question)),peek(NEWFIELD),peek(Question)),Question),Question) as NEWFIELD

Anonymous
Not applicable

Hi Harfoush,

Check the attached APP