Wednesday, February 8, 2017

MDX aggregate measure over specific dimensions

In the cube in our project, there was a need to aggregate a measure only on 3 out of 6 dimensions, so that the aggregation would not filter this measure on any of the excluded 3 dimensions.

After trying Aggregate and Ancesters functions I could finally get correct results with the root function as explained in this blog

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3b724376-aa6d-4bcc-afcb-a2ac07c94df5/mdx-to-aggregate-measure-over-specific-dimensions?forum=sqlanalysisservices

To sum it up, I created a calculated measure like:

member [measures].[TotalCustYearCat] as (
root([Date].[Calendar Year].currentmember), 
root([Product].[Category].currentmember),
root([Customer]),
[Measures].[Internet Sales Amount]
)

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...