472,995 Members | 1,559 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,995 software developers and data experts.

Problems in CALCULATING PERCENTAGE in SSRS 2005 Reports..

14
I'm Using Asp.Net with C# & Working with SSRS 2005 for Generating Reports..

The Following Expression I'm using in Reports to Show the Percentage of Particular Items in REPORT..

=Round((Fields!Clicks.Value*100)/Sum(Fields!Clicks_Show.Value, "DataSet1_Get_All_1234567"),2)& "%"

With this Expression I'm Getting Reports Percentage(Total) 100%(NO Problem)..

But for Some Reports it is Coming >100 or < 100 Total Percentage (ie 105% or 95%, --)..

For Some Reports, I'm Getting SAME PERCENTAGE VALUES to All Items..
ie In One Report Assume I'm having 4 Items.. I'm Getting ONE Percentage Value to All Items in That REPORT.. Just Like 35%,35%,35%,35%).. But when we Calculate the Items Percentage Values SEPERATELY RESULT is Different (Just Like 35%, 15%, 30%, 20%)..

I want to Give TOTAL Percentage for ONLY 100% for Reports..

How to do this..

What is the Wrong in My Expression.. Why It is Giving Correct Percentage for Few Reports & Wrong Result to Remaining Reports.. & Also Why Same Percentage Values are Repeating for All Items in Few REPORT's...


Thank You..
Apr 9 '08 #1
5 8259
deric
92
=Round((Fields!Clicks.Value*100)/Sum(Fields!Clicks_Show.Value, "DataSet1_Get_All_1234567"),2)& "%"
Is Clicks the same with Clicks_Show? If not, what is Clicks_Show?
I think that is where the problem is... you need to get and use the same values.
Apr 9 '08 #2
Aswanth
14
Is Clicks the same with Clicks_Show? If not, what is Clicks_Show?
I think that is where the problem is... you need to get and use the same values.
No Clicks & Clicks_Show are Different..
Clicks is One Column & Clicks_Show is Another Column..
Apr 9 '08 #3
rjvrnjn
26
Round((Fields!Clicks.Value*100)/Sum(Fields!Clicks_Show.Value, "DataSet1_Get_All_1234567"),2)& "%"
One of the apparent issues that I see is the use of both aggregate and non-aggregate field in the same expression. I'm not sure how your report is grouped and designed (whether matrix or table) and hence won't be able to give you an exact solution. In all my reports whenever I've to do a percentage calculation I either use the aggregate values sum(fieldname) or add a calculated expression to the dataset itself and then drag & drop it on the report.

As for the percentage values more than 100%, that's purely mathematical and possible. For example, if your clicks value is 200 & the clicks_show value is 100, what should be the percentage value? maybe I'm getting it wrong but your post doesn't say it clearly enough.
Apr 9 '08 #4
deric
92
No Clicks & Clicks_Show are Different..
Clicks is One Column & Clicks_Show is Another Column..
Yeah, obviously they are different columns, but what I'm trying to ask is whether they have the same values or not... because it is illogical to get the percentage of an amount with respect to a sum of another set of amounts. You might get a total of 100% of all your calculated percentages but most probably you'll get > or < 100%.

Well, correct me if I'm wrong..

You could consider doing it like this way:
= (Clicks * 100) / Sum(Clicks)
OR
= (Clicks_Show * 100) / Sum(Clicks_Show)
Apr 10 '08 #5
Aswanth
14
Yeah, obviously they are different columns, but what I'm trying to ask is whether they have the same values or not... because it is illogical to get the percentage of an amount with respect to a sum of another set of amounts. You might get a total of 100% of all your calculated percentages but most probably you'll get > or < 100%.

Well, correct me if I'm wrong..

You could consider doing it like this way:
= (Clicks * 100) / Sum(Clicks)
OR
= (Clicks_Show * 100) / Sum(Clicks_Show)


No they Don't Have Same Values.. They Are Different..
Just Check Here..

Clicks Values : 9000, 8000, 10000

Clicks_Show Values : 8000, 6500, 11000

The Percentages I'm getting : 35.29%, 31.37%, 39.22%

The Total of these Percentages are >100.. But I want to show Total Calculation for 100%..
Apr 10 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: josecruz | last post by:
I have created a main report, which is controlled with a date range parameter from the main form. The report has several sub reports, which perform calculations (counts and averages at the subreport...
0
by: Aswanth | last post by:
Good Morning.. I'm Using the following Expression for Division in SSRS-2005 in C# Web Applications.. =Round(((Fields!Price.Value*100)/Sum(Fields!CPU.Value, "DataSet1_AmountDetails")),2) & "%" ...
0
by: Aswanth | last post by:
I'm Generating Reports in SSRS-2005.. Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to...
0
by: Aswanth | last post by:
I'm Working with Asp.Net with C#.. & I'm Generating Reports in SSRS-2005.. Till Now I'm Generating Reports in SSRS-2005 with Stored Procedure.. in Which I'm Generating Reports for One...
0
by: Aswanth | last post by:
I'm Using Asp.Net with C# & SSRS 2005 for Generating Reports.. I'm Having HUGE Data in Text Log File.. I want to Get this Data from this Log File & to Generate REPORTS in SSRS 2005.. Please...
1
by: Aswanth | last post by:
I'm Using Asp.Net with C# & SSRS 2005 for Generating Reports.. I'm Having HUGE Data in Microsoft Excel Sheets .. I want to Get this Data from this Microsoft Excel Sheets & to Generate REPORTS in...
13
by: BLKeller | last post by:
I'm having a problem with a site I'm working on which contains links to Reporting Services reports. The pages are written in HTML and classic ASP. The links to the reports are in the following...
0
by: S_K | last post by:
Hi, I have a problem in which we need a ton of reports running against an AX system and we need allot of people building reports using SSRS (sorry Report Builder won't work for us). The problem...
0
by: abidthayyil | last post by:
Hello, I was working on SSRS 2005 as part of SQL Server 2005 Express Edition with Advanced Services Sp1. I successfully developed a custom reporting application. It was working fine. Then I...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.