Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Karthick30
Creator
Creator

New Column in Table load without Duplicates

I have a table like below. If i add Employeename and Age , its coming Properly. but when i add only Managername and Age. I am getting duplicates. since one Manager is responsible for many employees.Below case Manager Tim will show 4 times with 4 different age(since 4 employees reporting to Tim ). ManagerName is also part of Employee name. If i select Tim from EmployeeName its coming properly. Is there anyway to get the Manager column and age without duplicates.

Karthick30_0-1653659582859.png

 

Ultimate Requirement is to find Which Age category Managers are responsible for which age category Employees. like below

Karthick30_1-1653659914245.png

 

Any help on this please

 

 

Labels (3)
3 Replies
vvvvvvizard
Partner - Specialist
Partner - Specialist

:
LOAD * Inline [
Name , Age , Manager , Cat
A,42,T,B
W,65,T,D
M,33,T,A
K,30,T,A
T,45,M,B
];

B:
LOAD *,
Class(Age,10,0) AS Agecat
Resident A;

drop Table A;

EXIT SCRIPT;

iN YOUR PIVOT TABLE 

Agecat and Cat as dimesnion 

as expression 

=count(Agecat)

 

vvvvvvizard
Partner - Specialist
Partner - Specialist

Use the replace function around class () function , to grt rid of = and other characters you dont need

vinieme12
Champion III
Champion III

LOAD 
Name , Age , replace(class(Age,10),'<=x<','-') as AgeGroup ,Manager , Cat 

From yourdataSource;

 

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