Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Peek function.

Hi, i have a table like containing two columns.

Ex.

Name Segment
a             1

b              1

c             2

d              3

e              3

f               1

g              2

h              3

i              1

j              1

k            3

by using peek function i want to segregate names on the basis of segment 1, 2, and 3.

like

vsegment1= it should have names whose segment is 1

vsegment2=it should have names whose segment is 2

vsegment3= it should have names whose segment is 3.

please help.

Regards,

Piyush.

4 Replies
Anonymous
Not applicable
Author

Piyush

I am not sure I understand what you are trying to achieve.  Could you describe your desired end result ?

Best Regards,     Bill

salto
Specialist II
Specialist II

Hi Piyush,

As far as I know (of course I may be wrong) peek is a inter-registry function, that will help you to obtain records in previous psitions of the table you are loading.I do not know if this will be of help in your case.

You have the option to classify the names in the load script. In this case the segment will be stored in the VSegment field:

LOAD

     Name,

    Segment,

     if(Segment='1','vsegment1',

          if(Segment='2', 'vsegment2',

               if(Segment='3','vsegment3','N/A'))) as Vsegment

FROM...

But I do not if this really is an improvement ....

tresesco
MVP
MVP

Why peek? why not concat() like:

vsegment1=Concat({<Segment={1}>}Name, '-')

vsegment2=Concat({<Segment={2}>}Name, '-')

PFA

Not applicable
Author

Hi,

Just want to capture name in variable vsegment1 whose segment is 1. and Likewise.