Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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)

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;

View solution in original post

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