Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Span of Control (Direct Reports)- No of employees reporting to a manager

Hi All,

Please any one implemented Span of control with hierarchy levels in HR data model.

Help needed.

I have created DRs ALL(span of control ),using group by on manager id.

and want count of DRs ALL in chart with dimension country and hierarchy levels.

Thanks & Regards

Neetha

1 Solution

Accepted Solutions
Gysbert_Wassenaar

No idea what you're after. Have a look at the attached qvw. Then try to explain what result you expect to see.


talk is cheap, supply exceeds demand

View solution in original post

14 Replies
Gysbert_Wassenaar

I think you're going to need the Hierarchy function. See this blog post: Unbalanced, n-level hierarchies


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

I have created Hierarchy levels and Direct reports ,but unable to display direct reports count by levels in charts.

any suggestions please.

Regards

Neetha

Gysbert_Wassenaar

Post an example qlikview document.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

sorry for late response.

Please look into sample data ,attached as excel.

My requirements:

1.Heirarchy levels first

2.Next Direct reports for level 2(Count of employees at Level 3 for Level 2 managers)

Thanks & Regards

Neetha

Gysbert_Wassenaar

Where's the qlikview document? I'd like to see what you're having problems with.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Issue: Direct reports count is showing for all levels instead of level 3.

Created heirachy levels with code in script:

 

Levels:
Hierarchy(EMP_ID,Mgr_ID,EMP_NAME,, EMP_NAME,PATH,'/',LEVEL)
LOAD
EMP_ID,Mgr_ID, EMP_NAME, recno() as recno
Resident Data;

 

DirectReports count with code in script:

LOAD Distinct Mgr_ID,
Count(EMP_ID) as DRCount

Resident EMPLOYEE
Group By Mgr_ID;

 

 

Gysbert_Wassenaar

If you only want level three then add a where clause:

DirectReports:

LOAD Distinct

     MGR_ID,

     Count(EMP_ID) as DRCount

Resident

     Levels

Where LEVEL = 3

Group By MGR_ID

  ;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Please look into attached document

Anonymous
Not applicable
Author

Can I create DR's for all levels in script and only report for one level in visualization

Hi Gysbert,

I have attached new file.

please look into it, its not displaying all values.

Thanks & Regards

Neetha