
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Ultimate Requirement is to find Which Age category Managers are responsible for which age category Employees. like below
Any help on this please

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
:
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use the replace function around class () function , to grt rid of = and other characters you dont need


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LOAD
Name , Age , replace(class(Age,10),'<=x<','-') as AgeGroup ,Manager , Cat
From yourdataSource;
If a post helps to resolve your issue, please accept it as a Solution.
