Kevin,
I wanted to run this sample, but I don't see such tables in any of the AdventureWorks database version I have. Could you please post a version of this query I can run?
Or you should not run it in SSMS query window?
>Hi, Victoria,
>
>The FILTER function is used to limit results, based on some measure.
>
>For instance (and I'll use AdventureWorks as an example)....suppose you wanted to filter on Product subcategories in the year 2003, where the Internet Sales amount was greater than 3 million dollars.
>
>
>select [Measures].[Internet Sales Amount] on columns,
> filter( [Product].[Subcategory].children, [Internet Sales Amount] > 3000000) on rows
>from [Adventure Works]
>where [Ship Date].[Fiscal Year].[FY 2003]
>
>
>You use the WHERE clause to set the default context based on the necessary dimension members (ship year is 2003), and then you use the FILTER function to limit the product subcategory members to just those with 3 million or more in sales.
>
>I specialize in MDX and teach MDX, so if you have any more questions, feel free to ask.
If it's not broken, fix it until it is.
My Blog