user172839
user172839

Reputation: 1075

Count number of inner groups

I'm trying to count the number of child groups.

For example.

My group is as follows:

Parent Group
      Child Group (on multiple columns)

Example:

Parent 1
    Child Group 1
        1
        2
        3
    Child Group 2
        1
        2
*Total: 2 *

Parent 2
    Child Group 1
        1
        2
*Total: 1 *

*This is the figure I'm trying to calculate. Any ideas?

Upvotes: 1

Views: 4248

Answers (1)

Ian Preston
Ian Preston

Reputation: 39586

In the Parent Group Scope you can just use something like:

=CountDistinct(Fields!ChildGroup.Value)

Substituting the name of your Child Group field as required.

For example, say your data is like this:

enter image description here

And you've set up a table with groups based on Parent and ChildGroup:

enter image description here

You can see I've added the above expression to the Parent Group footer row - it will count all the Child groups in the Scope of the current parent.

The report works as required:

enter image description here

Upvotes: 2

Related Questions