I need to exclude some of the reseller product line. In actual cube that I am working I cannot do it by slicing it in the where clause because some of the measures will not work. So I decided to use the Exclude Function and put it in my Rows.

When I tried it, what it does is it exclude the product line that I don't want (this one works fine) but it skipped also the number (I used Topcount function) where the product line is rank.

What I want is to exclude the ProductLine and at the same time the counting and ranking will continue in whatever number I specified (in this example I set 300).

Here's the code (I used Adventure Works).

With Set [OrderReseller] as
Order([Reseller].[Reseller].[Reseller].members,
([Measures].[Reseller Gross Profit]),bdesc)

Member [Measures].[Rank] as
Rank ([Reseller].[Reseller].currentmember,
[OrderReseller])

Set [Excludedproductline] as {Except([Reseller].[Product Line].children,
{[Reseller].[Product Line].&[Road],[Reseller].[Product Line].&[Touring]})}

Select non empty {[Measures].[Rank],[Measures].[Reseller Gross Profit]} on columns,

non empty
( Topcount (([Reseller].[Reseller].[Reseller].members

),300,[Measures].[Reseller Gross Profit]), [Excludedproductline])

on rows
From [Adventure Works]