dbTalk Databases Forums  

Projected Inventory

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


Discuss Projected Inventory in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Devron Blatchford
 
Posts: n/a

Default Projected Inventory - 08-01-2004 , 06:55 PM






Hi there,

I am trying to come up with a way of projecting inventory into the future.
This will be based on a number of inputs and outputs but basically the
formula is:

([Current Inventory] +[Inventory In]) - [Inventory Out]

I have two calculated measures that give me [Inventory In] and [Inventory
Out] on any particular day. This works fine.

What I need now is something like the following:

Firstly determine if we are in the future i.e no inventory value so we need
to project it.

IIF(IsEmpty(measures.inventory),
((Time.PrevMember,measures.inventory) + Inventory In) - InventoryOut
, 0) AS [Projected Inventory]

The problem is that this works on the next day after the last current
inventory value but not into the future. I somehow need to base any future
projections on this formula.

I.e

IIF(IsEmpty(measures.inventory),
((Time.PrevMember, measures.[Projected Inventory]) + Inventory In) -
InventoryOut
, 0) AS [Projected Inventory]

I am not sure how to achieve this and combine the logic together.

Any Ideas?

Thanks
Devron



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Projected Inventory - 08-01-2004 , 11:02 PM






When the recursion terminates, return the inventory:

Quote:
IIF(IsEmpty(measures.inventory),
(Time.PrevMember, measures.[Projected Inventory])
+ [Inventory In] - [InventoryOut],
measures.inventory) AS [Projected Inventory]
Quote:

- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.