MDX parallelperiod

  • I am using the adventureworks 2008dw and cube, What I am trying to accomplish is getting the sales amount for the last period also, example I want sales for Jan 2007 and Jan 2006 and so on for all the month/year.

    What am I doing wrong? I have not worked much with mdx and can use your help. As of now the results I get for the ParPeriodSales member is error.

    with

    member [Measures].[ParPeriodSales] as

    (

    ParallelPeriod([Date].[Fiscal],1,[Date].[Fiscal].[Month].CurrentMember)

    ,[Measures].[Sales Amount]

    )

    select {[Measures].[ParPeriodSales],[Measures].[Sales Amount] }on 0,

    [Date].[Fiscal].[Month] on 1

    from [Adventure Works]

  • From BOL:

    Syntax

    ParallelPeriod( [ Level_Expression [ ,Index [ , Member_Expression ] ] ] )

    So for the first argument you need a Level Expression and you are using a Hierarchy Expression.

    So your expression should be:

    SUM(ParallelPeriod([Date].[Fiscal].[Fiscal Year],1,[Date].[Fiscal].CurrentMember)

    ,[Measures].[Sales Amount])

    I think the fiscal year level is called [Fiscal Year] in AW but you'll have to make sure....:-D


    I'm on LinkedIn

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply