dbTalk Databases Forums  

MDX opening stock - closing stock

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX opening stock - closing stock in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary Burke
 
Posts: n/a

Default MDX opening stock - closing stock - 06-20-2006 , 06:15 AM






hi all, not sure if I am in the right place :-0

I have the following MDX trying to get the opening stock, by month, for
the 12 months of the current year, by Stylecolour. Opening stock of one
month = closing of previous month. And to get some measures for each
stylecolour.

I have tried the following, but to no success. Any suggestions ?

SELECT Lastperiods(-12, OpeningPeriod([Proc Year].[Proc Month], [Proc
Year].[Proc Year].&[2006]).prevmember) on columns, non empty crossjoin
({filter(Descendants([Department].[All Department],
[Department].[StyleColour]), [Measures].[TSOH UNITS TY]<>0 or
[Measures].[TSOH UNITS LY]<>0 or [Measures].[TSOH $ TY]<>0 or
[Measures].[TSOH $ LY]<>0 )}, {[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 SalesInventoryOrdersIntransit WHERE ([Channels].[All
Channels].[01],[Group].[All Group].[Mens Footwear])



*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.