Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandermllr
Creator
Creator

Qlikview Fill up data

Hello,

I have this data format:

Key

Timestamp

Name

1234501.02.2017 05:00Alex
1234501.02.2017 05:30
12345

02.02.2017 03:46

12345

02.02.2017 17:02

Alex
54321

07.02.2017 18:23

Peter
98765

13.02.2017 20:45

Alex

I want to fill up the Name between the timestamp.

order by the key and timestamp.

I hope someone can help me


Thanks!

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Data:

load

     Key,

     Timestamp,

     if(Key = peek('Key') and isnull(Name),peek('Name'),Name) as Name

from yourDB

order by Key, Timestamp;

View solution in original post

8 Replies
m_woolf
Master II
Master II

Data:

load

     Key,

     Timestamp,

     if(Key = peek('Key') and isnull(Name),peek('Name'),Name) as Name

from yourDB

order by Key, Timestamp;

ahaahaaha
Partner - Master
Partner - Master

Hi Alexander,

If I understand you correctly, maybe something like this?

Table1:

LOAD Key,

     If(Key=Previous(Key), 1, 2) as ID_Key,

     Timestamp,

     Name

FROM

Book1.xlsx

(ooxml, embedded labels, table is Sheet1, filters(

Replace(1, top, StrCnd(null)),

Replace(3, top, StrCnd(null))

));

NoConcatenate

TableFinish:

LOAD

If(IterNo()=ID_Key, Key) as Key,

If(IterNo()=ID_Key, Timestamp(Timestamp), Name) as Timestamp

Resident Table1

While IterNo()<=ID_Key;

DROP Table Table1;

Result

1.jpg

Format Timestamp determine what you need.

Regards,

Andrey

alexandermllr
Creator
Creator
Author

Hello,

i want to have this:

Key

Timestamp

Name

1234501.02.2017 05:00Alex
1234501.02.2017 05:30Alex
12345

02.02.2017 03:46

Alex
12345

02.02.2017 17:02

Alex
54321

07.02.2017 18:23

Peter
98765

13.02.2017 20:45

Alex

If there is in same 'Key' two lines with the same "Name" and empty 'Name' between the 'Timestamp', it should fill up the "Name".

Thank you

sdmech81
Specialist
Specialist

HI,

PFA fr the same..

Check the script aswell   ..Data also attached in excel sheet 2

Sachin

sdmech81
Specialist
Specialist

Find excel as well..Sorry I think I missed excel attachment..

Sachin

khalander
Creator II
Creator II

Hi,

load

Key,

Timestamp,

if(isnull(Name),Peek(Name),Name) as Name

resident main_table

order by Key,Timestamp;

Hope it will work

alexandermllr
Creator
Creator
Author

Thank you

I had to use len(Name) = 0

surendraj
Specialist
Specialist

Its better to use

if(len(Trim(Name)) = 0)

Make sure to use trim to avoid necessary spaces..