Friday, February 24, 2012

Cube Aggregation

Simple question about OLAP Cube? Once the dimensions and cube are designed, when we process the cube, what aggregations are stored in the cube. Does the cube aggregate function defined in the measures like AggregateFunction: SUM, COUNT or is it more than that.
Another question—if the user wants to define there own aggregated function, say for example a statistical function such as standard deviation (STDEVP a MDX function) and wants to store the aggregation of that in the Cube while processing, is that possible?

SQL Server 2005 Step-by-Step has a good walk-through on aggregation design. I believe this is in Chapter 7. Basically, you can access the aggregation wizard on the Partitions tab of your cube designer. There's quite a bit to aggregations so, again, read that chapter to get the broader picture.

Regarding STDEV or STDEVP, I believe the MDX function could be used in a calculated member to give you what you are looking for. However, it's not clear to me if it calculates the data at the level of the set you specify or if it performs the calculation across the leaf level members. Either way, you could run into an issue with calculating standard deviation across aggregated data. I recommend you assemble the components of the formula yourself, stored those as part of the cube, and perform the final calculation in a calculated member.

B.

No comments:

Post a Comment