ssas - MDX query to have a snapshoot at a given date -
i have following fact table :
date item step value 2015-01-01 1 1 1.00 2015-01-01 2 1 2.00 2015-01-01 1 2 3.00 2015-01-02 1 2 4.00 2015-01-03 2 3 8.00 2015-01-05 1 3 16.00
and i'm looking script find value of items in each step @ given date.
for example, date '2015-01-04'
, resultset :
step value 1 0.00 2 4.00 3 8.00
i'm on sql server 2008.
===== update 1 make question more understandable
items can change of step can see in fact table, item in 1 , 1 step @ time. when calculate value of step, have sum value of each item present in step.
if in affirmative questioned in comment above, below might -
with member sumofvaluetillnow sum(null:[date].[date].currentmember, [measures].value) select sumofvaluetillnow on 0 [yourcube] ([date].[date].[2015-01-04])
or, if looking value
each date, below -
select sumofvaluetillnow on 0, [date].[date].children on 1 [yourcube]
Comments
Post a Comment