asb
asb

Reputation: 833

MDX Query Tuple representation using ampersand

What is the difference between representing tuple in an mdx query as

[CF Type].[CF TYPE].&[6] 

OR

 [ValScen].[Scenario Type].&[Term Point Rates]

Can I use the &[number] and the &[actual string] format interchangeably? If the cube is generated by another system, can the &[6] be different for each generation in usual practice? Or is it safer to use StrToMember or StrToSet. But this is not efficient as per this article. To give some context, in my case I use it like in below pseudocode

SELECT NON EMPTY { [Measures].x}    ON COLUMNS, NON EMPTY { (My Column1 * My Column2)}   DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM    ( SELECT ( { [CF Type].[CF TYPE].&[6] } ) ON COLUMNS FROM 
     (   SELECT ( { [ValScen].[Scenario Type].&[Term Point Rates] } ) ON COLUMNS FROM [My Cube]]))   
       WHERE ( [ValScen].[Scenario Type].&[Term Point Rates], [CF Type].[CF TYPE].&[6] )

Upvotes: 1

Views: 334

Answers (1)

whytheq
whytheq

Reputation: 35557

Those are members and not tuples. A Tuple would be surrounded by braces ().

I think they are interchangeable syntax if you’re using the caption such as .&[hello] and .[hello] but if you use the key then the ampersand is mandatory.

Upvotes: 1

Related Questions