SSRS: Why does SSAS Member UniqueName Return Nothing?

If your SSRS report is using SSAS MDX datasets, the member uniquename is particularly useful to pass parameter values to drill-through MDX reports or for sorting based on key values. If Fields!Attribute.UniqueName is returning nothing or blank or null value in your report, then most likely you are missing the DIMENSION PROPERTIES clause in your MDX dataset query

This is most likely to happen with hand written MDX queries rather than those generated by the query designer where the DIMENSION PROPERTIES clause is included by default. Just include DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME to your hand written MDX queries to correct this.

For example:
SELECT [Measures].[Internet Sales Amount] ON COLUMNS,
CROSSJOIN
(Filter([Date].[Fiscal Year].Children,[Measures].[Internet Sales Amount] > 0),
[Sales Territory].[Sales Territory Country].children,
[Product].[Category].Children)
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME
ON ROWS
FROM [Adventure Works]

You could also include MEMBER_KEY to the DIMENSION PROPERTIES clause to get the key value of the attribute if it’s different from the attribute’s name column.

2 thoughts on “SSRS: Why does SSAS Member UniqueName Return Nothing?

  1. Thanks for this tip Benny, This reminded me a reporting trick of getting Current members natural related members like

    nonempty(
    {

    [Date].[Financial].[Financial Month].MEMBERS — Reporting
    }

    , [Measures].CurrentMember
    )

    } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME
    , [Date].[Financial].[Financial Month].[Financial Month Number] — Get month numbers for sorting in reporting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s