O'Reilly logo

Microsoft® SQL Server® 2008 MDX Step by Step by C Ryan Clay Bryan C Smith and Hitachi Consulting

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11 Quick Reference

To

Do this

Identify the current user

Use the UserName function to return the qualified name of the current user’s Windows account. The following query demonstrates the use of this function:

WITH
MEMBER [Measures].[Current User] AS
  UserName()
SELECT
  {[Measures].[Current User]} ON COLUMNS
FROM [Step-by-Step]

You can use the VBA functions to parse the string value returned by the function, isolating its authority or name parts.

Implement dynamic security on a standard attribute-hierarchy

Consider employing a User dimension and relating this dimension to the attribute-hierarchy to be restricted through a measure group. An allowed set on the User attribute of the User dimension can be defined using the following expression:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required