SQL Server Performance Forum – Threads Archive
To Generate Running total across the YearsI have a daywise stock Qty in(+) and stock Qty out(-) entries.
To arrive at a transactionwise balance stock I need to generate running
total. I need to provide this in Cube with Excel front end. So when the user will
check the Time dimension with Year, Quarter, Month and Day levels. He can go on to any level and the balance stock of that level should be displayed. Can anyone help me in this?
If I got your problem right, the best solution (IMO) would be to do it in excel. I wrote an article about running totals, you can take a look http://www.sql-server-performance.com/mm_cursor_friendly_problem.asp), but the conclusion is to do it on the client (or to store the running total in db and to just display it when needed).
http://sqlservercentral.com/cs/blogs/amachanic/archive/2006/02/28/508.aspx Madhivanan Failing to plan is Planning to fail