I am trying to create a view for analysis on a fact table which has measure name as a dimension as opposed to having multiple measures. Here is an example of what the data looks like.
#Customer, Product, Measure, Data
Customer1, Product1, ASP, 4.2
Customer1, Product1, Units, 100
Customer2, Product2, ASP, 4.4
Customer2, Product2, Units, 200
... and so on and so forth.
I had build Attribute views with hierarchies for both customer and product dimensions and build analytic views. However now I have the need to flatten the Measures dimension and have the resulting Fact view look like:
#Customer, Product, ASP, Units
Customer1, Product1, 4.2, 100
Customer2, Product2, 4.4, 200
... and so on and so forth.
Now I want to build analytic views on this flattened view of my Fact table.
I was able to create a calculation view using Script mode, on the fact table and write a SQL to flatten the Measure dimension. But I am not able to now join this calculation view with the attribute views. Is there a way to leverage the existing Attribute views in this case?
The only way I can see for now is to use manual SQL to build out the entire view, including the joins needed by the attribute views and re-build the hierarchies in the definition of the calculation view. This essentially wastes all the work I have already done in building the attribute views and its hierarchies.
Is there a better approach?