Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Ultimate Requirement is to find Which Age category Managers are responsible for which age category Employees. like below
Any help on this please
:
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)
Use the replace function around class () function , to grt rid of = and other characters you dont need
LOAD
Name , Age , replace(class(Age,10),'<=x<','-') as AgeGroup ,Manager , Cat
From yourdataSource;