Sample 37136: Applying member-level security to a cube dimension that has more than one hierarchy
Overview
If you are applying member-level security to a dimension that has more than one hierarchy, you can use the <!--CONDITION--> operator to join the two conditions so that one or the other will apply depending on which hierarchy is used in the OLAP query.
Sample code
Here is sample MDX code for a cube that limits the Geography dimension and its two hierarchies, Global and Country_Detail, to only seeing data where Country=Russia:
{[Geography].[Global].[All Global],
[Geography].[Global].[All Global].[Asia],
[Geography].[Global].[All Global].[Asia].[Russia],
descendants([Geography].[Global].[All Global].[Asia].[Russia])}
<!--CONDITION-->
{[Geography].[Country_Detail].[All Country_Detail],
[Geography].[Country_Detail].[All Country_Detail].[Russia],
descendants([Geography].[Country_Detail].[All Country_Detail].[Russia])}
|
Therefore, you should be able to include both sets of MDX that work successfully by themselves into the MDX editor and connect them with the <!--CONDITION--> operator.
The <!--CONDITION--> operator is specific to SAS. It is used when defining member-level security to an OLAP cube when you have multiple hierarchies for a dimension.
Additional Documentation
For more information about cubes, see the SAS OLAP Server and SAS OLAP Cube Studio documentation pages.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
If you have more than one hierarchy defined to the dimension to which you are applying member-level security, you can use the <!--CONDITION--> operator to join the two conditions so that one or the other will apply depending on which hierarchy is used in the OLAP query.
Type: | Sample |
Topic: | Query and Reporting ==> OLAP (Online Analytical Processing)
|
Date Modified: | 2010-08-23 13:53:33 |
Date Created: | 2009-09-10 09:10:51 |
Operating System and Release Information
SAS System | SAS OLAP Server | z/OS | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |