2

I am working through the Adventure Works tutorial on the MSDN site and making good progress.

I was trying to test myself and go off the guide to see if I was understanding the lessons and I've gotten myself a bit confused.

My intention was to use the Prev.Member MDX command so that in the Pivot Table when looking at sales, I can see the sales totals for the same period, the year before.

(   [Measures].[Internet Sales Count]
    , [Order Date].[Calendar Date].PrevMember
)

This is the expression I thought would work. Sadly, this just produces blank fields on the Pivot Table. The [Order Date].[Calendar Date] is taken from the date hierarchy that the guide advised to make.

Trying the expression [Order Date].[Date Key].PrevMember also returns blank cells.

The other code tried was using [Order Date].PrevMember but that just returns #VALUE!.

whytheq
  • 34,466
  • 65
  • 172
  • 267
  • you need to add some context so that PrevMember knows it's starting point - currently you're sort of saying `"All Dates".PrevMember`... – whytheq Jan 30 '15 at 15:56

1 Answers1

0

Try adding in Currentmember so that your expression knows what to apply PrevMemeber to:

(   
  [Measures].[Internet Sales Count]
, [Order Date].[Calendar Date].CurrentMember.PrevMember
)
whytheq
  • 34,466
  • 65
  • 172
  • 267