Qlik Community

Qlik Sense App Development

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

Highlighted
rulohx87
New 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
Honored Contributor

Re: Fill empty values ​​with previous rows

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.

1 Reply
trdandamudi
Honored Contributor

Re: Fill empty values ​​with previous rows

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.