dbTalk Databases Forums  

Calculating a "running sum" within a year

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


Discuss Calculating a "running sum" within a year in the microsoft.public.sqlserver.olap forum.



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

Default Calculating a "running sum" within a year - 04-06-2004 , 10:08 AM






We have a proble within a cube measure. We ant to design acube
containing something like a "running sum". I am quoting this, beacause
i didn´t fin any similar expression for this.

So, if the column "Sum" is the expression we wanted, we want to get
this
result in the cube. (TIme is a dimension with the elements
Year,month...)

We just found this on the web groups for the food mart database, but
the sum
is not resetting at the beginning of the ýear.


Year Month Value Sum
=======================
2002 12 1 1
2003 1 5 5
2003 2 3 8
2003 3 12 20


hanks for your help

Jens

Reply With Quote
  #2  
Old   
Prasanna
 
Posts: n/a

Default Re: Calculating a "running sum" within a year - 04-07-2004 , 07:15 AM






Just do
sum(Periodstodate([Time].[Year],Time.CurrentMember),([Measures].[X]))

will give you the required result



MrIgel (AT) gmx (DOT) de (Jens) wrote in message news:<2ad00ef3.0404060708.db462f (AT) posting (DOT) google.com>...
Quote:
We have a proble within a cube measure. We ant to design acube
containing something like a "running sum". I am quoting this, beacause
i didn´t fin any similar expression for this.

So, if the column "Sum" is the expression we wanted, we want to get
this
result in the cube. (TIme is a dimension with the elements
Year,month...)

We just found this on the web groups for the food mart database, but
the sum
is not resetting at the beginning of the ýear.


Year Month Value Sum
=======================
2002 12 1 1
2003 1 5 5
2003 2 3 8
2003 3 12 20


hanks for your help

Jens

Reply With Quote
  #3  
Old   
Jens
 
Posts: n/a

Default Re: Calculating a "running sum" within a year - 04-08-2004 , 01:59 AM



Thank, its work really fine.

Jens.

(Here are something matching words to find this problem for the german
guys, (Analysis OLAP Running sum laufende Summe rollup sum mdx)

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.