Example 5—Giving Access to a Specific Measure Within a Dimension
In this example, the database role has access to cells for the North America member and its descendants in the Geography dimension, but the role does not have access to cells for any other members in that dimension. The database role also has access to cells for the 1998 member and its descendants in the Time dimension, but does not have access to cells for any other members in that dimension.
The following expression is the Multidimensional Expressions (MDX) expression that sets these permissions:
Ancestor(Geography.CurrentMember,[Continent]) IS North America
AND Ancestor(Time.CurrentMember,[Year])IS 1998
Reviewing the Result Set
Based on these cell data permissions for this database role, a query on all cells returns the result set shown in the following table.
Continent |
Region |
Cost |
Cost |
Revenue |
Revenue |
Tax |
Tax |
---|---|---|---|---|---|---|---|
1997 |
1998 |
1997 |
1998 |
1997 |
1998 |
||
Asia |
. |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
. |
Japan |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
. |
Korea |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
Europe |
. |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
. |
France |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
. |
Germany |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
#N/A |
N. America |
. |
#N/A |
2544 |
#N/A |
3201 |
#N/A |
432 |
. |
Canada |
#N/A |
511 |
#N/A |
691 |
#N/A |
58 |
. |
USA |
#N/A |
2033 |
#N/A |
2510 |
#N/A |
374 |
Important
If a Microsoft Windows user or group belongs to multiple database roles, a query on all cells would first result in a dataset being generated based on each database role to which the user or group belongs. Then, MicrosoftSQL ServerAnalysis Services would combine all these datasets into one dataset, and return that combined dataset to the user or group.
See Also