Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count in Script # times Employee Name appears as Manager Name

Hi there, I suspect this is easier than I think it is!

I have a standard Headcount table including Employee_Name and Manager_Name fields.

I want to Join to this a Reportees field capturing the number of times each Employee_Name appears as a Manager_Name.

If it were Excel it would be a simple CountIf(range = Manager_Name column, condition = This Employee_Name)

Can anyone help me with this?

Thanks - Mike

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

Headcount:

LOAD Employee_Name,

           Manager_Name

FROM ....

Left Join (Headcount)

LOAD Manager_Name as Employee_Name,

           Count(Manager_Name) as Count

Resident Headcount

Group By Manager_Name;

View solution in original post

4 Replies
Anil_Babu_Samineni

Perhaps This,

CountIf(range = Manager_Name column, condition = This Employee_Name)


Count({<range = {'$(=Only(Manager_Name))'}>}Employee_Name)

OR

Count({<range = P(Manager_Name)>}Employee_Name)

OR

Count({<range = $::Manager_Name}>}Employee_Name)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

May be like this:

Headcount:

LOAD Employee_Name,

           Manager_Name

FROM ....

Left Join (Headcount)

LOAD Manager_Name as Employee_Name,

           Count(Manager_Name) as Count

Resident Headcount

Group By Manager_Name;

Not applicable
Author

Worked like a charm, thanks very much!

sunny_talwar

Awesome!! I am glad it did. I would suggest you to close this thread by marking correct and/or helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny