Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramu_i
Contributor III
Contributor III

Based on Id display the name

Hi All,

I have data like name, ID and MGR ID .

here based on MGR id display the MGR Name.

Could you please help on that.

Input:

EMP ID Name MGR ID
1 Ram 2
2 Raj 4
3 Rani 2
4 Ravi 6
5 Roja 2
6 Rajesh 2
7 Raghu 2
8 Ramyya 6
9 Radha 6
10 Rangha 6

 

Required Out Put:

EMP ID Name MGR ID MGR Name
1 Ram 2 Raj
2 Raj 4 Ravi
3 Rani 2 Raj
4 Ravi 6 Rajesh
5 Roja 2 Raj
6 Rajesh 2 Raj
7 Raghu 2 Raj
8 Ramyya 6 Rajesh
9 Radha 6 Rajesh
10 Rangha 6 Rajesh

 

Thank you.

Ram

Labels (5)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

 

As below

Main:
Load * Inline [
EMPID,Name,MGRID
1,Ram,2
2,Raj,4
3,Rani,2
4,Ravi,6
5,Roja,2
6,Rajesh,2
7,Raghu,2
8,Ramyya,6
9,Radha,6
10,Rangha,6
];

Left Join(Main)
Load EMPID as MGRID,Name as MGRNAME
Resident Main;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

 

As below

Main:
Load * Inline [
EMPID,Name,MGRID
1,Ram,2
2,Raj,4
3,Rani,2
4,Ravi,6
5,Roja,2
6,Rajesh,2
7,Raghu,2
8,Ramyya,6
9,Radha,6
10,Rangha,6
];

Left Join(Main)
Load EMPID as MGRID,Name as MGRNAME
Resident Main;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

You can also explore 

 

Hierarchy

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptP...

 

HierarchyBelongsTo

https://help.qlik.com/en-US/qlikview/May2021/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptP...

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Ramu_i
Contributor III
Contributor III
Author

Hi Vinieme,

It's working . 

Thanks 

Ram