dbTalk Databases Forums  

Non Existing Dimension Member

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


Discuss Non Existing Dimension Member in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
necati@cbksoft
 
Posts: n/a

Default Non Existing Dimension Member - 04-17-2006 , 03:32 AM






Hi all,
I am getting time interval between two dates and use it as a set of dates.
Like:

WITH MEMBER [Time].[SetTime] AS 'Sum({[Time].[2005].[1]:[Time].[2006].[6]})'
SELECT {..} ON COLUMNS, NON EMPTY {..} ON ROWS FROM CRM_Detail where
([Time].[SetTime] )

and it works unless two date parameters are found in dimension members.

Otherwise, (i.e. [Time].[2005].[1] is not a member in the dimension) it
returns an exception. With error Message:

Formula error - cannot find dimension member ("[Time].[2005].[1]") - in a
name-binding function

So what should i do if the user enters an invalid date? Do you have any
advise? Can i handle it with 'ISEMPTY' function?

Thanks

--
Necati Sekkeli
CBKSoft
Junior Software Developer

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Non Existing Dimension Member - 04-17-2006 , 09:43 PM






If you're using AS 2005, you can set the 'MDX Missing Members Mode on
the dimension to "Ignore":

http://sqljunkies.com/WebLog/mosha/a...missing_member
s_mode.aspx
Quote:
What is 'MDX Missing Members Mode' in Analysis Services 2005 ?
...
Quote:

With AS 2000, you can use the VBA IsError() function:

http://groups.google.com/group/micro...olap/msg/cadb2
e3e58fad0df
Quote:
...
With Member [Measures].[TestExist] as
'iif(IsError(StrToValue("[Store Size in SQFT].[All Store Size in
SQFT].[20318]")),
"Missing", "Present")'

select {[Measures].[TestExist]} on columns
from Sales
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
necati@cbksoft
 
Posts: n/a

Default Re: Non Existing Dimension Member - 04-19-2006 , 03:45 AM



Thanks Deepak!
It seems it works in Foodmart sample.

--
Necati Sekkeli
CBKSoft
Junior Software Developer


"Deepak Puri" wrote:

Quote:
If you're using AS 2005, you can set the 'MDX Missing Members Mode on
the dimension to "Ignore":

http://sqljunkies.com/WebLog/mosha/a...missing_member
s_mode.aspx

What is 'MDX Missing Members Mode' in Analysis Services 2005 ?
...



With AS 2000, you can use the VBA IsError() function:

http://groups.google.com/group/micro...olap/msg/cadb2
e3e58fad0df

...
With Member [Measures].[TestExist] as
'iif(IsError(StrToValue("[Store Size in SQFT].[All Store Size in
SQFT].[20318]")),
"Missing", "Present")'

select {[Measures].[TestExist]} on columns
from Sales
...



- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


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.