Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this load script
MyTable:
LOAD * INLINE [
Ename,Egender,Dept
John,M,10
Hank,N,10
Jill,F,20
Frank,M,20
Joan,F,20
Chris,M,30
];
This results in this straight table
Ename Egender Dept
Chris M 30
Frank M 20
Hank M 10
Jill F 20
Joan F 20
John M 10
I would like an extra column emp_count_in_dept_with_current_selection with the number of employees in each department in the current selection of my data so
the desired result would be
Ename Egender Dept emp_count_in_dept_with_current_selection
Chris M 30 1
Frank M 20 3
Hank M 10 2
Jill F 20 3
Joan F 20 3
Anna F 10 2
And when I select F in the straight table I want
Ename Egender Dept emp_count_in_dept
Jill F 20 2
Joan F 20 2
Anna F 10 1
Count( total <Dept> Ename)
Count( total <Dept> Ename)
Thank you very much!