Getting MEMBER.UNIQUENAME with MDX query in Power Pivot Table Import wizard

Roman 1 Reputation point
2021-04-22T15:44:40.277+00:00

Hi everyone, I'm trying to solve the following issue: I'm getting the data from Analysis Service server, at some point I need to get not only MEMBER CAPTION, but also MEMBER.UNIQUENAME.
I tried to do this whit the Calculated Member inside query constructor, but failed, see the screenshot at the link https://prnt.sc/11vle9o
Please advise what am I doing wrong?

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,247 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Darren Gosbell 1,466 Reputation points
    2021-04-27T00:11:03.72+00:00

    You need to use [Hotels].[Hotel Country].CurrentMember.Uniquename

    Without the .Currentmember you are just returning the uniquename of the [Hotel Country] hierarchy.

    3 people found this answer helpful.
    0 comments No comments

  2. Roman 1 Reputation point
    2021-04-27T21:12:11.947+00:00

    Thank you very much, this works great.
    But I got new problem. As this is a measure, it returns all the names even those without the "real measure" value , is there a way to filter them by another measure, [Busy places] for example?

    0 comments No comments

  3. Darren Gosbell 1,466 Reputation points
    2021-04-27T22:15:08.543+00:00

    You could do something like the following to check if [Busy places] measure has a value.

    IIF( NOT( ISEMTPY([Measures].[Busy places] ) ) , [Hotels].[Hotel Country].CurrentMember.Uniquename )

    0 comments No comments