dbTalk Databases Forums  

accumulation - running total

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss accumulation - running total in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MJ
 
Posts: n/a

Default accumulation - running total - 07-17-2006 , 05:07 PM






SQL2K:

Month Qty
1/2006 10
2/2006 15
3/2006 5
......

I am looking for an accum_qty column that will give me the sum of previous
month:

Month Qty Accum_Qty
1/2006 10 10
2/2006 15 25
3/2006 5 30
.....

For the life of me, I can not seem to be able to find the correct syntax for
"accum_qty". Thanks much.


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: accumulation - running total - 07-17-2006 , 05:50 PM






search on the net for cumulative sum or pareto analysis.
but...
something like this could help:
sum( YTD(time.currentmember), measure.Qty)


"MJ" <MJ (AT) discussions (DOT) microsoft.com> wrote

Quote:
SQL2K:

Month Qty
1/2006 10
2/2006 15
3/2006 5
.....

I am looking for an accum_qty column that will give me the sum of previous
month:

Month Qty Accum_Qty
1/2006 10 10
2/2006 15 25
3/2006 5 30
....

For the life of me, I can not seem to be able to find the correct syntax
for
"accum_qty". Thanks much.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.