Hi,
I'm trying to display previous year's last month inventory beside current month inventory
by
with MEMBER [Measures].[CF Inventory] as
([DM TIME].CurrentMember.Parent.PrevMember.LastChild,[Measures].[Inventory])
SELECT
{ [Measures].[CF Inventory], [Measures].[Inventory] } ON COLUMNS,
NON EMPTY { ([DM City].[City].[CityA], [DM TIME].[YEAR].[YEARA], [DM TIME].[MONTH].[MONTHA], [DM WH].[DM WH].[WHA]) } ON ROWS
FROM [Cube]
When I try to parse this query the tool hangs.
Should I change [Measures].[CF Inventory] definition as
(ParallelPeriod([DM Time].[Year]).LastChild, [Measures].[Inventory])
Thanks
Rasyq
I do not think this is a valid query.
In your calculated measure you have a reference to [DM TIME].CurrentMember, but if you are using SSAS 2005, then you cannot do <dimension>.CurrentMember, you have to use <dimension>.<hierarchy>.CurrentMember. So I assume that you meant something like [DM TIME].[MONTHA].CurrentMember.
To answer your second question, yes, personally I would think that the parallel period approach is better as I think it more clearly expresses your intent (although I think both options should return the same result).
No comments:
Post a Comment