MDX - ParallelPeriod...

  • Hi,

    I'd need to implement calculated members such as 'The last three months' and the same one year ago. The first one is OK but I can't implement the other.

    Sum(PeriodsToDate([Time].[Month], [Time].CurrentMember), [Measures].
    [Sales Grossval])
    gives the sum in current month
    Sum(LastPeriods(3, [Time].CurrentMember), [Measures].[Sales Grossval]) 
    gives the sum during the previous three months
    BUT how to get the same values behind one year to appear at the same
     row of measures i.e.
    $ Month$ Last 3 months$ Last 3 months prev year
    2004 Jan100100
    2004 Feb200300
    2004 Mar100400
    2004 Nov50200
    2004 Dec60210
    2005 Jan50160100
    2005 Feb300410300
    2005 Mar100450400
    (hand written example data) Regards, Ville
  • You should be able to do this using the ParallelPeriod function.  Something like the following should work

    SUM(LastPeriods(3, ParallelPeriod(Year, 1, [Time].CurrentMember), [Measures].[Sales Grossval])

     

    Steve.

  • Jep,

    that's it! Thank you

    V

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

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