Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rulohx87
Contributor III
Contributor III

Fill empty values ​​with previous rows

Hello everyone !

I try to fill a name with a previous name where the values are nulls. I Tried with the function Previous():

IF(isNull(Name),Previous(Name),Name) // It's ok, but return one value.

Table:

idName
1Danna
2Issac
3 
4 
5John
6 

And I need these values.

idName
1Danna
2Issac
3Issac
4Issac
5John
6John

 

Thanks,

Labels (4)
1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

One way of doing this is as below:

Data:
Load
id,
If(Len(Name)>0,Name,Peek(Name)) as Name;
Load * Inline [
id, Name
1, Danna
2, Issac
3,
4,
5, John
6,
]
;

Hope this helps.

View solution in original post

1 Reply
trdandamudi
Master II
Master II

One way of doing this is as below:

Data:
Load
id,
If(Len(Name)>0,Name,Peek(Name)) as Name;
Load * Inline [
id, Name
1, Danna
2, Issac
3,
4,
5, John
6,
]
;

Hope this helps.

View solution in original post