Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MDX Filter
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01443633
Message ID:
01443762
Views:
33
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform