![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I use OleDb (.NET) to execute MDX queries. An simple example query: WITH MEMBER [Promotion Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] When I use OleDb to execute this query and populate a DataTable object, the MEMBER_UNIQUE_NAME column value for the [CalcMember] row comes up NULL instead of "[Promotion Media].[CalcMember]". [Promotion Media].[Media Type].[Member_Unique_Name] [Measures].[Unit Sales] ========================================= ================ [Promotion Media].[All Media].[Bulk Mail] 4320 (null) 4320 Can anyone tell me why that is and how to fix it? Thanks in advance. |
#3
| |||
| |||
|
|
Apparently (maybe Mosha can set me straight on this) Calc Members with no parent members are treated as belonging to the (All) level (see "Flattening Algorithm", rule 8 in BOL). If you define the calc member as a child of [All Media], therefore belonging to the [Media Type] level, a non-null unique name is retrieved: WITH MEMBER [Promotion Media].[All Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] HTH, Brian www.geocities.com/brianaltmann/olap.html "John" wrote: Hi, I use OleDb (.NET) to execute MDX queries. An simple example query: WITH MEMBER [Promotion Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] When I use OleDb to execute this query and populate a DataTable object, the MEMBER_UNIQUE_NAME column value for the [CalcMember] row comes up NULL instead of "[Promotion Media].[CalcMember]". [Promotion Media].[Media Type].[Member_Unique_Name] [Measures].[Unit Sales] ========================================= ================ [Promotion Media].[All Media].[Bulk Mail] 4320 (null) 4320 Can anyone tell me why that is and how to fix it? Thanks in advance. |
#4
| |||
| |||
|
|
Hi Brian, Thanks for your reply. What would happen if the cube did not have an ALL member? How would I create thecalculated member in that case? Thanks, "Brian Altmann" <findme@thesignaturewebsite> wrote in message news:BAB63382-9CCC-4426-B78E-AC3E357743AC (AT) microsoft (DOT) com... Apparently (maybe Mosha can set me straight on this) Calc Members with no parent members are treated as belonging to the (All) level (see "Flattening Algorithm", rule 8 in BOL). If you define the calc member as a child of [All Media], therefore belonging to the [Media Type] level, a non-null unique name is retrieved: WITH MEMBER [Promotion Media].[All Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] HTH, Brian www.geocities.com/brianaltmann/olap.html "John" wrote: Hi, I use OleDb (.NET) to execute MDX queries. An simple example query: WITH MEMBER [Promotion Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] When I use OleDb to execute this query and populate a DataTable object, the MEMBER_UNIQUE_NAME column value for the [CalcMember] row comes up NULL instead of "[Promotion Media].[CalcMember]". [Promotion Media].[Media Type].[Member_Unique_Name] [Measures].[Unit Sales] ========================================= ================ [Promotion Media].[All Media].[Bulk Mail] 4320 (null) 4320 Can anyone tell me why that is and how to fix it? Thanks in advance. |
#5
| |||
| |||
|
|
If the dimension has the (All) level disabled, when you create a calc member without specifying a parent (as you did in the first version of your query), the member belongs to the top level, and the unique name is retrieved normally. Regards, Brian "John" wrote: Hi Brian, Thanks for your reply. What would happen if the cube did not have an ALL member? How would I create thecalculated member in that case? Thanks, "Brian Altmann" <findme@thesignaturewebsite> wrote in message news:BAB63382-9CCC-4426-B78E-AC3E357743AC (AT) microsoft (DOT) com... Apparently (maybe Mosha can set me straight on this) Calc Members with no parent members are treated as belonging to the (All) level (see "Flattening Algorithm", rule 8 in BOL). If you define the calc member as a child of [All Media], therefore belonging to the [Media Type] level, a non-null unique name is retrieved: WITH MEMBER [Promotion Media].[All Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] HTH, Brian www.geocities.com/brianaltmann/olap.html "John" wrote: Hi, I use OleDb (.NET) to execute MDX queries. An simple example query: WITH MEMBER [Promotion Media].[CalcMember] AS '[Promotion Media].[All Media].[Bulk Mail]'SELECT {[Measures].[Unit Sales]} ON COLUMNS,{[Promotion Media].[All Media].[Bulk Mail], [Promotion Media].[CalcMember]} PROPERTIES MEMBER_UNIQUE_NAME ON ROWS FROM [Sales] When I use OleDb to execute this query and populate a DataTable object, the MEMBER_UNIQUE_NAME column value for the [CalcMember] row comes up NULL instead of "[Promotion Media].[CalcMember]". [Promotion Media].[Media Type].[Member_Unique_Name] [Measures].[Unit Sales] ========================================= ================ [Promotion Media].[All Media].[Bulk Mail] 4320 (null) 4320 Can anyone tell me why that is and how to fix it? Thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |