column aliasing in dynamic mdx -
01-15-2004
, 04:39 PM
Hello,
What i'm trying to figure out is how to do a column alias
in mdx similar to SQL AS.
**What i need is that this mdx always returns the same
number and alias name of columns in the flattened
resultset, regardless of value of the row parameter
(below)**
This is the dynamic mdx:
="select { [Measures].[Orders] } on columns,{" +
Parameters!Region.Value + ".Children } on rows from
ContactSales where [InvoiceDate].[2002].
where Parameters!Region.Value could any be one of these:
[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America].[United States]
[Contact].[Region].[All ContactRegion].[THE AMERICAS]
[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America]
[Contact].[Region].[All ContactRegion].[THE AMERICAS].
[North America].[United States].[Texas]
This was the closest i could get:
with MEMBER [Contact].[Region].[THE AMERICAS].[North
America].[United States].[Texas] AS 'mymember'
select
{ [Measures].[Orders] } on columns,
{ mymember.Children } on rows
from ContactSales where [InvoiceDate].[2002] |