dbTalk Databases Forums  

Formula error - cannot find dimension member

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


Discuss Formula error - cannot find dimension member in the microsoft.public.sqlserver.olap forum.



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

Default Formula error - cannot find dimension member - 08-16-2006 , 09:08 AM






I have this query in the FoodMart 2000 database that I want to run. Sometimes
there may be Promotion Media types of Direct Mail and at other times there
may not be.

How can I get this query to always successfully run even when there is no
records with a Promotion Media type of Direct Mail?

With Member [Promotion Media].[ExcludingMail] as
'Aggregate(Except([Promotion Media].[Media Type].members, {([Promotion
Media].[All Media].[Bulk Mail]),([Promotion Media].[All Media].[Direct
Mail])}))'
select {[Measures].[Store Sales]} on columns, {[Store].[Store State].members
} on rows from sales where [Promotion Media].[ExcludingMail]

Reply With Quote
  #2  
Old   
Jon
 
Posts: n/a

Default RE: Formula error - cannot find dimension member - 08-29-2006 , 03:05 PM






This should work:

With Member [Promotion Media].[ExcludingMail] as
'Aggregate(
Except([Promotion Media].[Media Type].members, StrToSet(
IIF(
IsError(StrToValue("([Promotion Media].[All Media].[Direct
Mail])")),
"{([Promotion Media].[All Media].[Bulk Mail])}",
"{([Promotion Media].[All Media].[Bulk Mail], ([Promotion
Media].[All Media].[Direct Mail])}"
)
))
)'
select {[Measures].[Store Sales]} on columns, {[Store].[Store State].members
} on rows from sales where [Promotion Media].[ExcludingMail]



"Thearon" wrote:

Quote:
I have this query in the FoodMart 2000 database that I want to run. Sometimes
there may be Promotion Media types of Direct Mail and at other times there
may not be.

How can I get this query to always successfully run even when there is no
records with a Promotion Media type of Direct Mail?

With Member [Promotion Media].[ExcludingMail] as
'Aggregate(Except([Promotion Media].[Media Type].members, {([Promotion
Media].[All Media].[Bulk Mail]),([Promotion Media].[All Media].[Direct
Mail])}))'
select {[Measures].[Store Sales]} on columns, {[Store].[Store State].members
} on rows from sales where [Promotion Media].[ExcludingMail]

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.