Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Running Sum per row in Report Expand / Collapse
Author
Message
Posted Monday, June 10, 2013 8:45 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:59 PM
Points: 112, Visits: 1,478
Hello I am having a few issues with a Matrix report I am developing:

Firstly I have two queries:

One:

 SELECT     Sales_Export.Country, Sales_Export.AccountNumber, InstrastatCustomers.AccountName, Sales_Export.ContractCode, Sales_Export.SalesValue, 
Sales_Export.SalesDate
FROM Sales_Export INNER JOIN
InstrastatCustomers ON InstrastatCustomers.AccountNumber = Sales_Export.AccountNumber
WHERE (Sales_Export.SalesDate BETWEEN @StartDate AND @EndDate)
GROUP BY Sales_Export.Country, Sales_Export.AccountNumber, InstrastatCustomers.AccountName, Sales_Export.ContractCode, Sales_Export.SalesValue,
Sales_Export.SalesDate
ORDER BY Sales_Export.SalesDate


I also have another query called Running Sum:

Two:


SELECT     SUM(SalesValue) AS SalesValue, AccountNumber
FROM Sales_Export
GROUP BY AccountNumber



My matrix report is as follows:

Country, AccountName, Account, ContractCode, SalesValue, MTD
Sum(SalesValue)





The matrix report produces sales of each individual day. In my month to date column I would like the sales for all the days added up in this column. I attempted to create an expression but this is summing the whole column.

=RunningValue(Fields!SalesValue.Value,Sum, "DailyExportSales")



Does anyone know how i can achieve the sum for each day in that column.
Post #1461593
Posted Tuesday, June 11, 2013 3:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:59 PM
Points: 112, Visits: 1,478
Fixed!
Post #1461965
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse