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.
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.