Friday, February 10, 2012

Calculating a "running sum" within a year

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 didnt 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
JensJust do
sum(Periodstodate([Time].[Year],Time.CurrentMember),([Measures].
[X]))
will give you the required result
MrIgel@.gmx.de (Jens) wrote in message news:<2ad00ef3.0404060708.db462f@.posting.google.com>.
.
> 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 didnt 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|||I use periodicity as a dimension in several of my own OLAP cubes. I use view
s to calculate YTD and QTD values so that A/S gets running totals at load ti
me instead of having to do it at query time. This method also exposes the va
lues to shrinkwrap client t
ools.|||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)

No comments:

Post a Comment