I am pretty new to MDX and I have written a basic MDX query which returns a measure as well as full hierarchy of my product dimension:
SELECT {[Measures].[Amount]} on 0,
{
DESCENDANTS([ProductH].[ProductH], [ProductH].[ProductH].[Lvl4], LEAVES)
}
ON 1
FROM
(
SELECT
{StrToSet('[AccountH].[AccountH].[Lvl1].&[TST17:0]',CONSTRAINED)} ON COLUMNS
FROM
(
SELECT
{StrToSet('[ProductH].[ProductH].[All]',CONSTRAINED)} ON COLUMNS
FROM [Model]
)
)
This returns the result set for my SSRS report which is basically the amount for all levels in product dimension for the user's chosen account hierarchy
Now, I want to exclude from this set the amounts under the 2nd level of account hierarchy with the specific name "Exclude". I've managed to add this filter using crossjoin and except - based on account node's unique name:
[AccountH].[AccountH].[Lvl2].&[TST17:0]&[TST17:1000]
but I want specifically to filter out based on the shown name, remove amounts where:
[AccountH].CURRENTMEMBER.MEMBER_CAPTION = "Exclude"
How do I filter out based on hierarchy node's name?