MDX - Opening stock - poor performance -
06-20-2006
, 06:17 PM
Hi all, hope I'm in the right sport :-)
I have the following MDX which is trying to get the "opening" stock for a
period - ie the opening stock for one period is the closing stock of the
previous period.
SELECT Lastperiods(-12, OpeningPeriod([Year].[Month],
[Year].[Year].&[2006]).prevmember) on columns,
non empty crossjoin ({Descendants([Department].[All Department],
[Department].[StyleColour])}, {[Measures].[TSOH $ TY], [Measures].[TSOH $
LY], [Measures].[TSOH Units TY], [Measures].[TSOH Units LY], [Measures].[TSOH
COST VAL TY], [Measures].[TSOH COST VAL LY]}) on rows
FROM SalesInventorycube
WHERE ([Channels].[All Channels].[20],[Group].[All Group].[Mens Footwear])
Any suggestions ?
I would like the output to be months across the columns, and Department,
StyleColour, and the "data" in rows - ie get 6 rows for stylecolour. |