dbTalk Databases Forums  

filtering on a member that doesn't exist

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss filtering on a member that doesn't exist in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Swart
 
Posts: n/a

Default filtering on a member that doesn't exist - 04-26-2005 , 08:12 AM






Sorry if this is a newbie type question. The easier to answer I guess.


I have an MDX query that queries a cube with syntax that looks
something like this:


WITH
MEMBER [Measures].[Passed]
AS '([Measures].[Value], [Pass Flag].[Pass Flag].&[-1])'
SELECT { [Measures].ALLMEMBERS } ON COLUMNS
{ [Operation].[Name].ALLMEMBERS } ON ROWS
FROM MyCube
WHERE ([EquipmentLocation].[Name].[M*ySite], ...


If the cube is processed from a database with no data, the query will
fail when querying a table with -1 since -1 is not yet a member of the
given dimension.


Question: What is the best way to filter query results if we don't yet
know if the member exists in the cube?


Michael Swart


Reply With Quote
  #2  
Old   
Chris Webb
 
Posts: n/a

Default RE: filtering on a member that doesn't exist - 04-26-2005 , 10:05 AM






Take a look at the following entry on my blog, which should answer your
question
http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg!166.entry

HTH,

Chris

"Michael Swart" wrote:

Quote:
Sorry if this is a newbie type question. The easier to answer I guess.


I have an MDX query that queries a cube with syntax that looks
something like this:


WITH
MEMBER [Measures].[Passed]
AS '([Measures].[Value], [Pass Flag].[Pass Flag].&[-1])'
SELECT { [Measures].ALLMEMBERS } ON COLUMNS
{ [Operation].[Name].ALLMEMBERS } ON ROWS
FROM MyCube
WHERE ([EquipmentLocation].[Name].[MĀ*ySite], ...


If the cube is processed from a database with no data, the query will
fail when querying a table with -1 since -1 is not yet a member of the
given dimension.


Question: What is the best way to filter query results if we don't yet
know if the member exists in the cube?


Michael Swart



Reply With Quote
  #3  
Old   
Michael Swart
 
Posts: n/a

Default Re: filtering on a member that doesn't exist - 04-26-2005 , 12:36 PM



Thanks Chris, that's a big help.
Michael Swart


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.