Reputation: 1053
Hi I have created a time dimension like below:
Here i am considering the 4 Weeks as one Quad (In a year we will get total 13 Quads) , I Need to use the Quad in MDX Paralle period function, When i select the current quad it needs to take the last year same quad and needs to dispaly the data.
The Dimesion like below:
To Achive the same i have used the quad in MDX and passed the int value as 13, but not worked for me.
As Per @FrankPI
I wrote the MDX Query like below:
with member [Measures].[pycomp]
as
ParallelPeriod ([DimTime].[Time].[Year], 1, [DimTime].[Time].[Quad].CurrentMember)
select [Measures].[pycomp] on 0,
[DimTime].[Time].[Year].&[2012].&[Quad 07 (2012)] on 1
from [Cube]
I am getting the error as i said in the below comments "#Error".
When i click on the cell it showint the below msg.
CellOrdinal : 0
VALUE : #Error Query (3, 45) The CURRENTMEMBER function expects a hierarchy expression for the 1 argument. A member expression was used.
FORMATTED_VALUE : #Error Query (3, 45) The CURRENTMEMBER function expects a hierarchy expression for the 1 argument. A member expression was used.
Any help is apprecieated.
Thanks, Roshan
Upvotes: 2
Views: 1511
Reputation: 13315
ParallelPeriod ([Date].[Calendar].[Year], 1, [Date].[Calendar].CurrentMember)
should deliver you the quad one year before the current one. The first argument is the level to use as the reference (year
in this case), the second the number of reference periods (in this case years) to go back, and the third argument is the reference point, normally on a lower level than the reference level.
Edit
According to your edited query, and assuming you did not rename DimTime
in the cube object, this should be as follows:
ParallelPeriod ([DimTime].[Time].[Year], 1, [DimTime].[Time].CurrentMember)
Upvotes: 1