Monday, March 26, 2012

Reporting Services 2005 - Matrix Grouped Report - Calculating Percentages %

Hi,

Could someone help with the following problem, I what to create a cross-tab report of the following data, grouped by Colour:

RAW DATA

Name Colour Sarah Black Kim Red Jane Black Jane Pink Robert Yellow Tom Green Tom Black Billy Black Sarah Black Sarah Black Tom Pink Kim Pink Robert Black

Group Colours by Names Report

Number Proportions % Name Black Green Pink Red Yellow Total by Name Black Green Pink Red Yellow Billy 1 1 100.00% 0.00% 0.00% 0.00% 0.00% Jane 1 1 2 50.00% 0.00% 50.00% 0.00% 0.00% Kim 1 1 2 0.00% 0.00% 50.00% 50.00% 0.00% Robert 1 1 2 50.00% 0.00% 0.00% 0.00% 50.00% Sarah 3 3 100.00% 0.00% 0.00% 0.00% 0.00% Tom 1 1 1 3 33.33% 33.33% 33.33% 0.00% 0.00%

I want to produce a Matrix cross-tab report, like the above, within Reporting Services. Any suggestions welcome

Many Thanks,

Radha

This is a pretty basic matrix report. Make sure to add a matrix to the layout design and then...

1. add name to row

2. add color to column

3. add name to data and change the expression to count(name.....)

4. add name to data again but to the right of the first one. You will see a light blue/green line appear and then release your mouse. Now you need to change the expression to formatpercent(count(name...))

This should do it.

|||

fsugeiger

Thanks for the above response, but now I am getting 300% for Name, Sarah for the colour Black . I need to show this as the percentage of the "Total by Name" that should = 100%.

For Tom the % should be 33%, not 100% results now:-

Name Black Green Pink Red Yellow Total by Name Black Green Pink Red Yellow Sarah 3 3 300.00% 0.00% 0.00% 0.00% 0.00% Tom 1 1 1 3 100.00% 100.00% 100.00% 0.00% 0.00%

Solution to this would be very welcome, and greatly appreciated, from anyone.

Thanks

Radha

|||Hi , i m currently building a report that will calculate frequencies using a MATRIX .

I have a column that contains multiple groups of answers as you can see in the following screenshot.

In each group of answers i compute the total (calling the subtotal function) .

The problem is that now i want to compute the frequencies for each answer.. So for the first group of answers i want to divide each cell with each corresponding total .

I cant do that at the current moment because the number of answers in each group is diffirent (im using a matrix) and there is no way to know the total because it is computed on the fly.

Is there a way i can do that?

Thnx in advance

No comments:

Post a Comment