I'm using the following MDX Query to define the allowed member set in a dynamic security role over a parent child hierachy:
Generate(
NonEmpty (
[Business Unit].[Business Unit Key].[Business Unit Key].members,
(
[Measures].[AD Account Business Unit Count],
StrToMember("[AD Account].[AD Account Name].["+Username()+"]")
)
), {
LinkMember (
[Business Unit].[Business Unit Key].CurrentMember,
[Business Unit].[Business Units]
)
}
)
The MDX query returns as expected when I run it in SQL, and when I look at the 'Basic' tab in the role the correct attributes of the hierachy are selected automatically... all good.
However when I process and view this hierachy in the cube I can still see all of the attributes of the hierachy as if the dynamic security role isn't working at all.