I am new to MDX. Could any one help me create a caculated measure to Rollup the Stock measures.
I have a stock table with following Dimensions
Day, Warehouse, Product, Stock Value, Stock Count.
I need a Measure to be Created in the OLAP cube which rollup last day stock to Next level in time hierarchy.
Assume today 15th July is week 26 (week 26 has 13th July to 18th July)
11th July ,warehousea,itema,103,41
12th July ,warehousea,itema,200,80
13th July ,warehousea,itema,100,40
14th July ,warehousea,itema,95,33
15th July ,warehousea,itema,120,46
Week --------- Stock Value --------- Stock Count
Week 25 --------- 200--------- 80
Week26 ---------120--------- 46
Same way Month7 will have
Here i want to rollup the last nonempty set to as the value of the parent level.
Week level stock will be the stock of the last day of the week for which stock is loaded.
Month level stock will be the stock of the Last day of the Month for which stock loaded.
Quarter level stock will be the stock of the last day of the quarter for which stock loaded.
w26 stock is 15th July stock
m7 stock is 15th July Stock
year stock is 15th July Stock.
Thanks & Regards
which is loaded da