I want to include the member key in the result set. I've found out a way to
do it, however it's very slow. My queries need to use a NON EMPTY, and when
the Key is returned it negates the use of a NON EMPTY since there is always
a value for it. I've tried using a FILTER, but performance stinks.
Any ideas?
--Runs in about five seconds. Returns 4,500 rows. Does not return the member
Key
SELECT NON EMPTY { [Measures].[Billing Revenue } ON COLUMNS ,
NON EMPTY { { { DESCENDANTS( [Sales].[Sales Relationship to Ad].[Sales
Relationship].&[37101], [Sales].[Sales Relationship to Ad].[Ad] ) } * {
[Date].[Date].[Day].[06/19/07]:[Date].[Date].[Day].[07/19/07] } } } ON ROWS
FROM [Sales]
--Runs in about 45 seconds. Returns 75.000 rows. Returns the member key. The
NON EMPTY's are ignored (nulls are returned) since I am bringing back the
Member Key.
WITH MEMBER [Measures].[AdID] AS
'[Sales].[Ad].CurrentMember.Properties("Key")'
SELECT NON EMPTY { [Measures].[Billing Revenue], [Measures].[AdId] } ON
COLUMNS ,
NON EMPTY { { { DESCENDANTS( [Sales].[Sales Relationship to Ad].[Sales
Relationship].&[37101], [Sales].[Sales Relationship to Ad].[Ad] ) } * {
[Date].[Date].[Day].[06/19/07]:[Date].[Date].[Day].[07/19/07] } } } ON ROWS
FROM [Sales]
--Runs in five minutes. Returns 4,500 rows and the member key. Desired
result set, yet very slow.
WITH MEMBER [Measures].[AdID] AS
'[Sales].[Ad].CurrentMember.Properties("Key")'
SELECT { [Measures].[Billing Revenue],[Measures].[AdID] } ON COLUMNS ,
FILTER ({ { { DESCENDANTS( [Sales].[Sales Relationship to Ad].[Sales
Relationship].&[37101], [Sales].[Sales Relationship to Ad].[Ad] ) } * {
[Date].[Date].[Day].[06/19/07]:[Date].[Date].[Day].[07/19/07] } } },
[Measures].[Billing Revenue] > 0) ON ROWS
FROM [Sales]
or
WITH MEMBER [Measures].[AdID] AS
'[Sales].[Ad].CurrentMember.member_key'
, NON_EMPTY_BEHAVIOR = [Measures].[Billing Revenue]
"Jesse O" <jesp...@hotmail.com> wrote in message
news:ODAdiVgY...@TK2MSFTNGP04.phx.gbl...
Thank you!
"Jeje" <will...@hotmail.com> wrote in message
news:3B2E1C18-1D56-4720...@microsoft.com...