473,395 Members | 1,941 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 8335
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.