Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Blessed1978
Yak Posting Veteran
97 Posts |
Posted - 2014-03-18 : 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
71 Posts |
Posted - 2014-03-19 : 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)_! |
|
|
|
|
|