Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

 SQL Server Forums Profile | Active Topics | Members | Search | Forum FAQ Register Now and get your question answered!
 Username: Password: Save Password Forgot your Password?
 All Forums  SQL Server 2012 Forums  Analysis Server and Reporting Services (2012)  SSRS 2012 PERCENTAGE CALCULATION Reply to Topic  Printer Friendly
Author  Topic

Blessed1978
Yak Posting Veteran

97 Posts

 Posted - 03/18/2014 :  23:41:24 I would like to retrieve info ON A SSRS 2012 REPORT basED on the below sqlSELECT Departments, SUM(sale_Amount) 'Sales', (SUM(SALE_Amount) / @sales * 100) AS 'PercentSales'FROM Employee_Sales WHERE sold_Date BETWEEN @BeginDate AND @EndDate How to I calculate the percentage of the sale amount(PERCENTAGESALES). In SSRS 2012 based on tHis query, as you can see I set parameters for begin date and end date. In the about qert I am doing the percentage calculations in management studio, I would like to do in in SSRS. the @sales parameter is gathered from select @sales = SUM(SALE_Amount)FROM EMPLOYEE_SalesWHERE SOLD_Date BETWEEN @BeginDate AND @EndDate

maunishq
Yak Posting Veteran

Canada
71 Posts

 Posted - 03/19/2014 :  11:16:46 First create a dataset using this query:SELECT Departments, SUM(Sale_Amount) AS SalesFROM Employees_SalesWHERE Sold_Date BETWEEN @BeginDate AND @EndDateNow create a tablix. Place Departments in Column 1 and Sales in Column 2.Now in Column 3, use the expression: =ReportItems!Textbox00.Value * SUM(Sales). -- Here Textbox00 is the name of the textboxThen Click the cell of Column 3 and Format it as %.You are done.=======================Not an Expert, Just a learner.!_(M)_!
Topic
 Reply to Topic  Printer Friendly Jump To: Select Forum General SQL Server Forums       New to SQL Server Programming       New to SQL Server Administration       Script Library       Data Corruption Issues       Database Design and Application Architecture SQL Server 2012 Forums       Transact-SQL (2012)       SQL Server Administration (2012)       SSIS and Import/Export (2012)       Analysis Server and Reporting Services (2012)       Replication (2012)       Availability Groups and DR (2012)       Other SQL Server 2012 Topics SQL Server 2008 Forums       Transact-SQL (2008)       SQL Server Administration (2008)       SSIS and Import/Export (2008)       High Availability (2008)       Replication (2008)       Analysis Server and Reporting Services (2008)       Other SQL Server 2008 Topics SQL Server 2005 Forums       Transact-SQL (2005)       SQL Server Administration (2005)       .NET Inside SQL Server (2005)       SSIS and Import/Export (2005)       Service Broker (2005)       Replication (2005)       High Availability (2005)       Analysis Server and Reporting Services (2005)       Express Edition and Compact Edition (2005)       Other SQL Server Topics (2005) SQL Server 2000 Forums       SQL Server Development (2000)       SQL Server Administration (2000)       Import/Export (DTS) and Replication (2000)       Transact-SQL (2000)       Analysis Services (2000)       MSDE (2000) Development Tools       ASP.NET       Reporting Services Development       Other Development Tools Site Related Forums       Site Related Discussions       Article Discussion       Poll Discussion       The Yak Corral Other Forums       SQL Server 6.5 \ SQL Server 7.0       Other Topics       MS Access       ClearTrace Support Forum Old Forums       CLOSED - General SQL Server       CLOSED - SQL Server 2005/Yukon  -------------------- Home Active Topics Frequently Asked Questions Member Information Search Page
 SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC
 This page was generated in 0.03 seconds.