Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Lookup

I have table A which is having column ID , Name,SupervisorID

ID Name  SupervisorID

1    A          3

2    B         

3    C         2

4    D         2

I want to show ID , Name, Supervisor Name , without using hierarchy load .

1 Solution

Accepted Solutions

Re: Re: Lookup

How about something like this ?

Temp:

LOAD * INLINE [

    ID, Name, SupervisorID

    1, A, 3

    2, B

    3, C, 2

    4, D, 2

];

SuperMap:

Mapping

load

  ID as SupervisorID,

  Name as SupervisorName

resident Temp

;

Data:

NoConcatenate

load

  ID,

  Name,

  SupervisorID,

  applymap('SuperMap',SupervisorID, null() ) as Supervisor

resident Temp

;

drop table Temp ;

3 Replies
ali_hijazi
Honored Contributor

Re: Lookup

what do you mean by hierarchy load

Re: Re: Lookup

How about something like this ?

Temp:

LOAD * INLINE [

    ID, Name, SupervisorID

    1, A, 3

    2, B

    3, C, 2

    4, D, 2

];

SuperMap:

Mapping

load

  ID as SupervisorID,

  Name as SupervisorName

resident Temp

;

Data:

NoConcatenate

load

  ID,

  Name,

  SupervisorID,

  applymap('SuperMap',SupervisorID, null() ) as Supervisor

resident Temp

;

drop table Temp ;

nagaiank
Valued Contributor III

Re: Lookup

You may use HIERARCHY load using ID as NodeID, SupervisorID as ParentID.

Qlikview 'Help' gives the details of Hierarchy prefix.

Community Browser