Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSRS - Ratio not calculating correctly

Posted on 2010-08-12
2
Medium Priority
?
1,500 Views
Last Modified: 2012-06-21
I have a drilldown report and Group results for ELA/MHG are not calculating RATIO separately....  Any idea what I am doing wrong?

Ratio=Sum(Fields!ccSTA_MED.Value, "ReportDB")/(Sum(Fields!ccSTA_MED.Value, "ReportDB")+Sum(Fields!ccSTA_TELE.Value, "ReportDB")+Sum(Fields!ccSTA_ICU.Value, "ReportDB"))

Attached is an Excel Sample of SSRS report.

 Report2.xls
0
Comment
Question by:epicazo
2 Comments
 
LVL 21

Expert Comment

by:Alfred A.
ID: 33426542
It is possible that you might be missing a group if you have nested groupings (parent/child groupings) since you mentioned that you have a drilldown report.  
For example if you have four groups nested in hierarchical fashion (e.g.  Group1 -> Group2 -> Group3 -> Group4) and by chance your columns only accommodate three groups (e.g. Group1 -> Group2 -> Group4) for example, then the values would be different and your result would not calculate correctly.


Also, based on your Excel Spreadsheet, you need to provide a condition in your expression (e.g. using IIF) to determine if the values in the row are ELA or MHG in order to calculate the correct ratio for each row.  It looks like your aggregate functions is aggregating for both ELA and MHG.
0
 

Accepted Solution

by:
epicazo earned 0 total points
ID: 33433440
I really wouldn't want to put an iff condition, then otherwise it wouldn't be dynamically calculating groups.  I figured out the problem.   There I was using the "ReportDB"

Sum(Fields!ccSTA_MED.Value, "ReportDB")/(Sum(Fields!ccSTA_MED.Value, "ReportDB")+Sum(Fields!ccSTA_TELE.Value, "ReportDB")+Sum(Fields!ccSTA_ICU.Value, "ReportDB"))

This solved the problem...
Sum(Fields!ccSTA_MED.Value)/(Sum(Fields!ccSTA_MED.Value)+Sum(Fields!ccSTA_TELE.Value)+Sum(Fields!ccSTA_ICU.Value))

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question