Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Dimension security by using MEMBER_NAME Expand / Collapse
Author
Message
Posted Thursday, August 15, 2013 11:33 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 5:24 AM
Points: 17, Visits: 405
Hi all,

In a dimension I have one attribute where the very same MEMBER_NAME occur for several members.
For example, all the following unique members share the same member_name "MyMember".
[Dimension].[Hierarchy].[Level].&[1]&[592]
[Dimension].[Hierarchy].[Level].&[2]&[592]
[Dimension].[Hierarchy].[Level].&[3]&[592]

What I would like to do, in dimension security, for a specific role, for this specific attribute, is to make use of the MEMBER_NAME property when defining the allowed member set.
Like this: " all members with the MEMBER_NAME = "MyMember" " should be allowed.

Is this possible to do? If so, I would be really thankful for some help on how to write the correct MDX statement for this.

Thanks,
Martin
Post #1484860
Posted Friday, August 16, 2013 4:11 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 5:24 AM
Points: 17, Visits: 405
This did the trick:
filter
([Dimension].[AttributeHierarchy].allmembers
,instr([Dimension].[AttributeHierarchy].CurrentMember.MEMBER_VALUE, '592') > 0)

Post #1485405
Posted Saturday, August 17, 2013 7:23 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, December 2, 2014 5:24 AM
Points: 17, Visits: 405
As per suggestion from Darren Gosbell I changed the way of solving this, to get better performance:
I created a new, hidden attribute where the key is only the second part of the composite key in the other attribute. Then I reference one single member of the new attribute hierarchy as the allowed set:
[Dimension].[AttributeHierarchy_hidden].&[592]

Post #1485483
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse