Count subordinates only one level below in a hierarchy

  • Hi,

    Does anyone know how to count only the number of people just one level below a given level in a hierarchy instead of counting all the subordinates in SSRS? Is there a way to control the number of recursion that is going to happen instead of counting every employee till the lowest level?

    Thanks in advance.

  • Yes but let me first ask... how often is your hierarchy updated and how many nodes does it have in it?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi Jeff,

    thank you for replying to my post.

    It's updated every time new employees join the company and old employees leave, or when employees get promotions.

    There are 5 nodes.

  • sutharmarajah (6/29/2012)


    Hi Jeff,

    thank you for replying to my post.

    It's updated every time new employees join the company and old employees leave, or when employees get promotions.

    There are 5 nodes.

    There are only 5 people in the hierarchy???

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • No, sorry. I misunderstood...there are 464 people and 5 levels in the hierarchy.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply