dbTalk Databases Forums  

supporting not operator in the slicer for mdx

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


Discuss supporting not operator in the slicer for mdx in the microsoft.public.sqlserver.olap forum.



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

Default supporting not operator in the slicer for mdx - 10-03-2003 , 11:03 AM






Hello,
here is comparitive sql query based on the sales cube from default foodmart
2000 sample catalog

select measures.unit sales , CutomerName from sales
where storeName <> "Store1". Here we are interested in all stores whose name
is not "store1"
..
I understand that select portions would go in the select axis for the MDX
query

i.e. select measures.[unit sales] on columns,
Customers.[Name].members on rows from
sales where ??????

how do I write corrosponding slicer part in the mdx query.

Thanking you in advance.

Santosh



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

Default supporting not operator in the slicer for mdx - 10-03-2003 , 02:30 PM






Hi Santosh,

You can try something like this...

With member store.total as 'aggregate({except({store.
[store name].members},{[store].[store name].[store
1]})})' select {[measures].members} on columns,
{[Customers].[Name].members} on rows from sales where
store.total

Cheers,
Sanka


Quote:
-----Original Message-----
Hello,
here is comparitive sql query based on the sales cube
from default foodmart
2000 sample catalog

select measures.unit sales , CutomerName from sales
where storeName <> "Store1". Here we are interested in
all stores whose name
is not "store1"
..
I understand that select portions would go in the select
axis for the MDX
query

i.e. select measures.[unit sales] on columns,
Customers.[Name].members on rows from
sales where ??????

how do I write corrosponding slicer part in the mdx query.

Thanking you in advance.

Santosh


.


Reply With Quote
  #3  
Old   
Tom Chester
 
Posts: n/a

Default Re: supporting not operator in the slicer for mdx - 10-03-2003 , 11:39 PM



An MDX WHERE clause is a tuple. Since only one member per dimension can go
in a tuple, the only way to do this is by creating a calc member that is an
aggregation of the set, like so:

WITH
MEMBER Store.AggStores AS
' Aggregate ({ [Store Name].Members - {[Store 1]} }) '

SELECT
etc...
WHERE (Store.AggStores)

tom @ the domain below
www.tomchester.net


"santosh" <santoshgujar (AT) ureach (DOT) com> wrote

Quote:
Hello,
here is comparitive sql query based on the sales cube from default
foodmart
2000 sample catalog

select measures.unit sales , CutomerName from sales
where storeName <> "Store1". Here we are interested in all stores whose
name
is not "store1"
.
I understand that select portions would go in the select axis for the MDX
query

i.e. select measures.[unit sales] on columns,
Customers.[Name].members on rows from
sales where ??????

how do I write corrosponding slicer part in the mdx query.

Thanking you in advance.

Santosh





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.