dbTalk Databases Forums  

Inventory Totals

comp.databases.olap comp.databases.olap


Discuss Inventory Totals in the comp.databases.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Biju Francis
 
Posts: n/a

Default Inventory Totals - 01-05-2004 , 12:24 AM






Inventory Totals

I use the following Mdx Expression to get the Inventory Totals
(Tail(Descendants([Fiscal Year].currentmember,[Fiscal Year
Month]),1).item(0),[Measures].[StockOnHand])

It Gives me the Following Results

StockOnHand
2003 150
Quarter4 150
Oct 120
Nov 130
Dec 150

2004 (Blank)
Quarter1 (Blank)
Jan 125
Feb (Blank)
Mar (Blank)

My Query is How Can I show
2004 Quarter 1 Total as 125 which is the Stock Position for Jan
instead of Blank
2004 Total as 125 the Stock Position for Jan instead of Blank Value

Please Advice

Regards,
Biju Francis

Reply With Quote
  #2  
Old   
Rick
 
Posts: n/a

Default Re: Inventory Totals - 01-06-2004 , 12:06 AM






You want to get value of the last descendant on month as the year's value.
I think what you should do is to add a constraint NONE EMPTY on your mdx.
So try this:
(Tail(
IIf (Filter(Descendants([Fiscal Year].currentmember,[Fiscal Year
Month]),not IsEmpty([Measures].[StockOnHand])).count=0 ,
Descendants([Fiscal Year].currentmember,[Fiscal Year Month]),
Filter(Descendants([Fiscal Year].currentmember,[Fiscal Year
Month]),not IsEmpty([Measures].[StockOnHand])))
,1).item(0)
,[Measures].[StockOnHand])

the IIF just see if there exist any member's value is not empty. If no, the
Inventory total should be empty, else should be the last none empty one.

if you are sure there must be at least one none empty value in the
descendants, you may just omit the IIF.
"Biju Francis" <bijufrancis (AT) msn (DOT) com> ????
news:933ccbfd.0401042224.5acc282e (AT) posting (DOT) google.com...
Quote:
Inventory Totals

I use the following Mdx Expression to get the Inventory Totals
(Tail(Descendants([Fiscal Year].currentmember,[Fiscal Year
Month]),1).item(0),[Measures].[StockOnHand])

It Gives me the Following Results

StockOnHand
2003 150
Quarter4 150
Oct 120
Nov 130
Dec 150

2004 (Blank)
Quarter1 (Blank)
Jan 125
Feb (Blank)
Mar (Blank)

My Query is How Can I show
2004 Quarter 1 Total as 125 which is the Stock Position for Jan
instead of Blank
2004 Total as 125 the Stock Position for Jan instead of Blank Value

Please Advice

Regards,
Biju Francis



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.