Link to home
Start Free TrialLog in
Avatar of cipriano555
cipriano555

asked on

Year to Date Totals with MDX in Analysis Services.

I have a simple demonstration cube with one dimension, a time dimension with levels date, month, quarter and year,   and a measure [ACCOUNT BALANCE].

I'm trying to compute Year to date totals for [ACCOUNT BALANCE].
To do this I created a calculated measure called [YTD ACCOUNT BALANCE]

WITH MEMBER Measures.[YTD ACCOUNT BALANCE] AS SUM (YTD([TIME].[DATE].CurrentMember),[Measures].[ACCOUNT BALANCE])
SELECT    NON EMPTY({[Measures].[ACCOUNT BALANCE], Measures.[YTD ACCOUNT BALANCE] } )ON COLUMNS
,[Time].[Date].&[2005-12-06T00:00:00]:[Time].[Date].&[2006-02-26T00:00:00] on Rows
from [BalanceData]

This query generates an error.  The error says,

By default a year level was expected. No such level was found in the cube.

See attached image. User generated image
ASKER CERTIFIED SOLUTION
Avatar of Jason Yousef
Jason Yousef
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial