Please start any new threads on our new site at 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!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

97 Posts

Posted - 03/18/2014 :  23:41:24  Show Profile  Reply with Quote
I would like to retrieve info ON A SSRS 2012 REPORT basED on the below sql


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)



Yak Posting Veteran

71 Posts

Posted - 03/19/2014 :  11:16:46  Show Profile  Reply with Quote
First create a dataset using this query:
SELECT Departments, SUM(Sale_Amount) AS Sales
FROM Employees_Sales
WHERE Sold_Date BETWEEN @BeginDate AND @EndDate

Now 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 textbox
Then Click the cell of Column 3 and Format it as %.
You are done.

Not an Expert, Just a learner.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.6 seconds. Powered By: Snitz Forums 2000