views:

252

answers:

4

We are developed a custom MOLAP engine for live processing a large amount of data in process. And now we got a requirement to integrate SSAS with our system. Dimension's meta info and attributes data are very easy to get. But how can I get facts data without making SSAS to calculate aggregates i.e. data that stored only on leafs? Aggregates and calculations we perform ourselves.

Selecting data from SQL Database is not a solution because Cube while loading can perform joins, filtering. clearing of data etc.

Example:

Suppose we have Product Dimension:

  • Product.All
    +Product.Bread
    +Product.Chair
    +Product.Book

And facts table - Sales:

|Product|Qty|  
|Bread  | 1 |  
|Chair  | 3 |  

I want to get from cube only real data, not aggregated one:

|Product|Qty|
|All    | 4 |  
|Book   | 0 |  
|Bread  | 1 |  
|Chair  | 3 |
+1  A: 

Bottom line, you cannot get the updated facts without reprocessing the cube. If you want the raw data in real time you will have to actually calculate it yourself from the dimension/fact tables in the data warehouse.

keithwarren7
I _can_ reprocess cube it is not a problem.I want to get from cube only rows that _actually_ exists in DW. and I should be able to find each row in DW. Is it possible at all?If in DW there is a two rows with:First: Product Dimension attribute value == Bread and Measure Qty value == 1. Second: Product Dimension attribute value == Chair and Measure Qty value == 2. I want to get only that rows but not three rows (if Product Dimension does not have a hierarchy)P.All 3 - it is aggregate P.Bread 1 P.Cheir 2
Sergey Mirvoda
If there is an hierarchies and several dimensions situation is even worse because of Cartesian product.
Sergey Mirvoda
+1  A: 

in ssas u can disable hierarchy level aggregation and for the empty rows use non- empty as a keyword before fetching the data

paranjai
thanks, how can I disable level aggregation? can you provide example for Adventure works cube?
Sergey Mirvoda
select the dimension in the cube structure tab , click on it's properties and set property "Allmemberagregationusuage" to None and then ur problem will be solved
paranjai
I can't modify cube structure in such a brute force way. Can I handle it via MDX?
Sergey Mirvoda
how is this brute force...i dont think in MDX what u want is achievable because thats how hierarchies are build
paranjai
+3  A: 

Try looking at DrillThrough in SSAS. This can display the fact-grain data, and is available in Excel as the default action when you double-click a cell. You can customise the result set, so long as all measures/dimensions come from the relevant fact table:

http://csjohnlam.spaces.live.com/Blog/cns!996308EF3A99432B!214.entry?sa=340601263

You'll also find this useful:

http://asstoredprocedures.codeplex.com/wikipage?title=Drillthrough&referringTitle=Home

Meff
@Meff nice idea! thanks!
Sergey Mirvoda
A: 

hi paranjai, I tried using "Allmemberagregationusuage" and have also set custom member formula. But it is still showing the aggregated values, not the value from the formula. Please help.

Jameel

JAMEELIQBAL