I’m attempting to query an SSAS cube using MDX, I have a list of numeric values which are ordered in the cube and I want to refer to an adjacent cell in the cube in order to return the value.
WITH MEMBER Measures.[LastShift]<br>
AS<br>
(<br>
[Measures].[Impact Value GBP], <br>
[Dim Shift].[Shift Value1].PrevMember<br>
)<br>
MEMBER Measures.[NextShift]<br>
AS<br>
(<br>
[Measures].[Impact Value GBP], <br>
[Dim Shift].[Shift Value1].NextMember<br>
)<br>
SELECT <br>
{NONEMPTY([Measures].[Impact Value GBP]), <br>
Measures.LastShift,<br>
Measures.NextShift<br>
}<br>
ON 0,<br>
NONEMPTY([Dim Shift].[Shift Value1].[Shift Value1])<br>
ON 1<br>
FROM [factTradeValues]<br>
I can see in the RDBMS that I do have adjacent values, but I cannot get the MDX to return anything other than null. Maybe I’m being thick, but cannot see the solution.
Thanks for any help
PrevMember and NextMember are “member functions” so you need do something like this…