Showing posts with label calculating. Show all posts
Showing posts with label calculating. Show all posts

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

Tuesday, February 21, 2012

Reporting off both a Stored Procedure and Table

Hi All,

I am using a Stored Procedure in the report. In the details section,
I have a formula for calculating End_date.This formula works fine and displays the data.But I want to check if this END_Date lies in the list of holidays which is given in another table 'tbHolidays'.
If it does lie in the list of Holidays then I need to add 1 to End Date.

Do I need to write a SQL expression for fetching the data from 'tbHolidays'? Can anybody out there please help me??

Thanks

Rashmias far as i know, if u use stored procedure u can't use SQL Expression.

r u using ref cursor in stored procedure?|||Thanks Raheem...
Yes I am using cursors in the SP. The cursor is used to fetch the records from join of two tables and then calculations are done for the fetched data. Then the data is inserted into a temporary table and a SELECT query is there at the end to fetch the rows.

Is there any other way to fetch the records from the table?Also I am not sure if a simple comparison of End Date with the data from tbHolidays would work...Helppppp!!!

Rashmi