Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS 2008 R2 Average Averages of Child Row Groups

$
0
0

I have looked in many forums and I cannot find a solution to my issue.

My dataset returns this information:

Country State  Region  City Population
A            B        C           P1  2

A            B        C           P2  1

A            B        D           P3  3

And In my report, I need this output

Country       State       Region      City        Population

A

                    B                                           (AVG(Population))

                                   C                             (AVG(Population)) = 1.5

                                                    P1          2

                                                    P2          1

                                   D                             (AVG(Population)) = 3

                                                    P3          3

So I have 4 row groups, one for Country, State, Region, and City. I can show the average population for each region (Region C is 1.5), but I cannot show the average population for the state (text bolded above). In this example, the average population of the state should be (1.5 + 3) / 2 = 2.25, but instead I am getting 2 (because it is finding the average of all populations 2+3+1 / 2 = 2).

Does anyone know how I can find the average as I mentioned above?


120811049008


Viewing all articles
Browse latest Browse all 10045

Trending Articles