dbTalk Databases Forums  

MDX Filter Help Required

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


Discuss MDX Filter Help Required in the microsoft.public.sqlserver.olap forum.



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

Default MDX Filter Help Required - 07-31-2003 , 08:27 AM







Hi guys,
I am new to MDX, well what I am trying to do is

SELECT { CrossJoin({Market.Country.[Pakistan].CHILDREN},
CrossJoin({Measures.[Sales]},{Time.Year.[2002]}))} ON COLUMNS,
{
Filter({Product.Team.MEMBERS}, (((Time.Year.[2002],Measures.Sales,
Market.country.Pakistan.Central) > 110000000) And
(Market.country.Pakistan.North,Time.Year.[2002],Measures.Sales) >
110000000)
And ((Time.Year.[2002],Measures.Sales, Market.country.Pakistan.South) >
110000000))
} ON ROWS FROM [Sales]

I wrote this MDX successfuly, the problem is the search condition where
I can't use the MEMBER keyword, and I have to write explicitly every
MEMBER of the region level with the whole condition again and again with
the AND operator; like I wrote
(((Time.Year.[2002],Measures.Sales, Market.country.Pakistan.Central) >
110000000) And
(Market.country.Pakistan.North,Time.Year.[2002],Measures.Sales) >
110000000)

I know I can't use
(((Time.Year.[2002],Measures.Sales, Market.country.Pakistan.CHILDREN) >
110000000)
but is there any alternative way to do this, cuz here there are only 3
regions IF I got 20 or 25 (Regions) MEMBERS it will be a very long and
complex MDX.
I hope you ppl understand wot i m trying to say.
Help needed.
Thanks
Saulat

--
Posted via http://dbforums.com

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

Default MDX Filter Help Required - 08-01-2003 , 09:22 AM






You can try filtering by :

sum(Market.country.Pakistan.CHILDREN ,iif(
(market.currentmember,Time.Year.[2002],Measures.Sales )
<110000000,1,0)) = 0

HTH,
Brian
www.geocities.com/brianaltmann/olap.hmtl

Quote:
-----Original Message-----

Hi guys,
I am new to MDX, well what I am trying to do is

SELECT { CrossJoin({Market.Country.[Pakistan].CHILDREN},
CrossJoin({Measures.[Sales]},{Time.Year.[2002]}))} ON
COLUMNS,
{
Filter({Product.Team.MEMBERS}, (((Time.Year.
[2002],Measures.Sales,
Market.country.Pakistan.Central) > 110000000) And
(Market.country.Pakistan.North,Time.Year.
[2002],Measures.Sales)
110000000)
And ((Time.Year.[2002],Measures.Sales,
Market.country.Pakistan.South)
110000000))
} ON ROWS FROM [Sales]

I wrote this MDX successfuly, the problem is the search
condition where
I can't use the MEMBER keyword, and I have to write
explicitly every
MEMBER of the region level with the whole condition again
and again with
the AND operator; like I wrote
(((Time.Year.[2002],Measures.Sales,
Market.country.Pakistan.Central)
110000000) And
(Market.country.Pakistan.North,Time.Year.
[2002],Measures.Sales)
110000000)

I know I can't use
(((Time.Year.[2002],Measures.Sales,
Market.country.Pakistan.CHILDREN)
110000000)
but is there any alternative way to do this, cuz here
there are only 3
regions IF I got 20 or 25 (Regions) MEMBERS it will be a
very long and
complex MDX.
I hope you ppl understand wot i m trying to say.
Help needed.
Thanks
Saulat

--
Posted via http://dbforums.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.