There are some situations where we need to calculate aggregations on some calculated measures in MDX. Though it might be possible to define such aggregations in a pure calculated measure, the performance of such queries is significantly slower since each calculation has to be done at each leaf member level and them add them all up to the desired level.
The other much more preferred alternative is to declare a real measure and define its value at leaf scope in MDX definition. Using this approach, the aggregations are automatically calculated at the desired level, and since results of the calculations are cached at all relevant levels, MDX queries are slow only for the first time.
Chris Webb explains this approach in details in this blog:
https://blog.crossjoin.co.uk/2013/05/29/aggregating-the-result-of-an-mdx-calculation-using-scoped-assignments/
The other much more preferred alternative is to declare a real measure and define its value at leaf scope in MDX definition. Using this approach, the aggregations are automatically calculated at the desired level, and since results of the calculations are cached at all relevant levels, MDX queries are slow only for the first time.
Chris Webb explains this approach in details in this blog:
https://blog.crossjoin.co.uk/2013/05/29/aggregating-the-result-of-an-mdx-calculation-using-scoped-assignments/
No comments:
Post a Comment