Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX Calc measure to accomdate Smi-Additive and delta SCD at the same time?

Status
Not open for further replies.

Rolaper

Technical User
Jun 12, 2012
1
US
thread960-1619662 gave a great example and answer as to handle the processing of deltas over time in a cube using mdx.

I have created a cube for inventory that uses this same concept to track inventory adjustments over time for specific SKUs. I have an extension to the problem that I hope someone can help me with.

My inventory adjustments are associated with a slow changing dimension such that, at the start of time my inventory position has a dimensional attribute status of 'REGULAR PRICE'. Over time, SKUs go on sale, therefore I end up with inventory adjustmens for the same SKU with a status of 'ON SALE'. Now if I filter on RETAIL STATUS = 'ON SALE', I get negative number.

Problem is, I want the mdx calculation to sum the deltas since the opening inventory regardless if they were 'REGULAR PRICE' or 'ON SALE'. For inventory, I need to sum up all deltas regardless of status to get the correct current inventory number, but show the current total based upon the status of 'REGULAR' or 'ON SALE'.

So for the following data
DATE SKU RETAIL STATUS AMOUNT
June 12 123 REGULAR 100
June 15 123 REGULAR -5
June 17 123 ON SALE -10
June 21 123 ON SALE -10

Doing the calculation as a sum over time filtering on 'ON SALE', I get a value of -20 for my current inventory. What I want is to see my 'ON SALE' inventory as 75. If I do not filter on the retail status, I get the correct inventory amount of 75.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top