Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

Re: Logic to use previous row issue

take a look at this post Generating Missing Data In QlikView

Highlighted
Specialist
Specialist

Re: Logic to use previous row issue

Something like this would work


If(ColumnA=peek(ColumnA),

     If(ISNULL(Question),

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

Highlighted
Creator
Creator

Re: Logic to use previous row issue

Hi Harfoush,

Check the attached APP