Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Security on Parent-Child Hierarchy

$
0
0

Problem Statement: In Parent Child Hierarchy say with Manager - Employee relationship, if we apply security using Siblings function in the Dimension Data Security (Allowed Member Set) then it displays children of peers at same level as current employee.

Scenario:

Create Employee Dimension with Parent-Child hierarchy with steps below -

1) add data

===============================

(EmpKey|Name|Position| loginId| level| MgrKey)

1|Scott King|CEO|sking|level1|null

2|Rick Peters|VP|rpeters|level2|1

3|Steve Parker|VP|sparker|level2|1

4|Matt Jones|Dir|mjones|level3|2

5|Doug Blanc|Dir|dblanc|level3|2

6|Jay Lawson|Dir|jlawson|level3|3

7|Lance Roberts|Dir|lroberts|level3|3

============================

2) Create Parent-Child hierarchy on MgrKey with its Usage = Parent

2a)set ValueColumn of Login_ID attribute to EmpKey.

2b) Also set ValueColumn of MgrKey attribute to Login_ID. Rename Parent-child hierarchy to Employees

3) Create Security Role and configure Dimension data security.

In the allowed member set write the below MDX statement.

{ StrToMember( "[Employee].[Employees].&[" + CStr(StrToMember("[Employee].[Login ID].&[" + UserName( ) + "]").MEMBERVALUE) + "]"), StrToMember( "[Employee].[Employees].&["+ CStr(StrToMember("[Employee].[Login ID].&[" + UserName( ) + "]").MEMBERVALUE) + "]").SIBLINGS }

Expected Result:

Using Siblings function - Ideally if Steve Parker connects to SSAS Cube then he should see his totals, only his subordinate totals, only his Peer's totals(not their subordinates) and his manager's totals.

Actual Result:

Due to above Dimension Security configuration, if Steve Parker connects to SSAS Cube then he will see his totals, his subordinate totals and his manager's totals. However due to Siblings function "Steve Parker" is also able to see Rick Peters's subordinate details.

Query: Is there a way to achieve the Expected Result by restricting the children of Siblings?




Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>