I know we can't use an Aggregate Function for a filter in a matrix.
Here is the situation In AdventureWorks. I have three levels:
- Category
- Subcategory
- Product
And 1 Calc_Member:
=With MEMBER Calc_Member as [Measures].[Internet Average Sales Amount]
And actually:
[Measures].[Internet Average Sales Amount]=
[Measures].[Internet Sales Amount]/[Measures].[Internet Order Count]
I want different Aggregations for each level in the hierarchy. For subcategory and Product the folmula for Calc_Member is as I've mentioned before:
[Measures].[Internet Average Sales Amount]
But for Category Level I want Average of related subcategories:
WITH MEMBER Calc_Member AS
Average(existing [Product].[Subcategory].[Subcategory].members
, [Measures].[Internet Average Sales Amount])
In Analysis services this works fine, but I have a report in reporting services based on this dataset:
- category
- subcaegory
- product
- Calc_member
In ssrs I use a matrix with three row groups, and add total for each group. For Category Level 1 want to use an Aggregate Function in ssrs (to use Formlula that's defined in analysis service) and again it works fine.
But if I want to use a Filter on some member (e.g category, Subcategory, Product) it throw this error:
The aggregate function "Aggregate" cannot be used in a report that contains any filters
And this error is accepteable too, but what I dont undrestand is: if I use an Aggregate Function in Matrix1 and I use a Filter in Matrix2 it throw the error as well.
Why?