Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
gerrycastellino
Creator III
Creator III

counting # of managers with 1 or 2 direct reports

I need to create an expression where I count the # of managers with 2 or less direct reports.

Is this right ?

=if(

AGGR(sum(ROLL_UP_COUNT),MGR_NAME) <= 2, Count(Distinct MGR_NAME)

)


As a follow-up to this, how would I construct a range on the direct reports ? (say between 3 and 5)


Gerry.

1 Solution

Accepted Solutions
sunny_talwar

For 2 or less

Count(DISTINCT {<MGR_NAME = {"=Sum(ROLL_UP_COUNT) <= 2"}>} MGR_NAME)

For between 3 and 5

Count(DISTINCT {<MGR_NAME = {"=Sum(ROLL_UP_COUNT) >= 3 and Sum(ROLL_UP_COUNT) <= 5"}>} MGR_NAME)

View solution in original post

1 Reply
sunny_talwar

For 2 or less

Count(DISTINCT {<MGR_NAME = {"=Sum(ROLL_UP_COUNT) <= 2"}>} MGR_NAME)

For between 3 and 5

Count(DISTINCT {<MGR_NAME = {"=Sum(ROLL_UP_COUNT) >= 3 and Sum(ROLL_UP_COUNT) <= 5"}>} MGR_NAME)

View solution in original post