Tuesday, March 20, 2012

A challenging CUBE related question

Hi,

I have data coming in from our OLTP's view which has the following sales related information:

1) Date of Sale
2) Product Sold
3) Customer to which the Product was sold
4) QTy. sold
5) Total Sale Amount

I am bringing in this information into my "staging area" and from there I am building my Customer, Product, and Time Dimension and obviously my FACT table. The measures in my fact table were TotalSalesand Total QtySold and everything was working fine and I was able to analyze, slice, dice my cube in many ways...

Now the problem:

I also have planning related data available from another OLTP based view which contains the following information:

1) Plan Year
2) Plan Month (using Plan Year and Plan month,I "derived" a date which for any month was the 1st of that month)
3) Planned Product
4) Planned Sale (Amount)
5) Planned Qty (for sale)

You would have noticed that planning is NOT done at "Customer Level" and the planning data is only for product and time level (and that too only upto month level).

After populating my FAct table from the Sales data, I appended the planning related data into my fact table hoping that as long as I do not select any thing in the Customer dimesion and only go as low as the month level on my Time dimension, I will be able to see all of the following (measures) for any/all products:

Planned Sale, Actual Sale, Planned Qty., Actual Qty,

However I am unable to get anything displayed in the Planned Sale and Planned Qty despite applying all of the little knowledge that Ihave so far in the world of BI and making data marts
...

I really hope that my questions and requirement is clear.Can someone please help me get to

the solution.

Many many TIA.I hope I understand you correctly. If I did, I would have thought of doing the following (thinking from OLAP standpoint):

Dimensions:
- Create shared dimension for Time to support Date of Sale and Plan Month, Year
- Create shared dimension for Product

Cubes/facts:
- Create two separate cubes one for Actual and one for Planned using the shared dimensions. The Actual can have the Customer as a Private Dimension (it may help to design the customer also as a shared dimension).
- Create a virtual cube on top of the Actual and Planned.
- Create calculated measures for differentials between Actual and Planned.

Murthy

No comments:

Post a Comment