dbTalk Databases Forums  

Filtering Measures

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


Discuss Filtering Measures in the microsoft.public.sqlserver.olap forum.



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

Default Filtering Measures - 10-16-2003 , 07:51 AM






Dear NG

We have a measure called Income. The user now wants to filter the result as
hereafter:

Example: Income is bigger than 1000 but smaller than 1500 $.

I know that measures can be filtered by select the dimensions. But is it
possible to
filter the returned result again?

Thanks for help

Mike



Reply With Quote
  #2  
Old   
Matt Carroll [MS]
 
Posts: n/a

Default Re: Filtering Measures - 10-17-2003 , 11:47 AM






You can use the Filter() MDX function to do this. As the first argument,
give it the set of tuples to be filtered. As the second argument, define a
boolean expression that tests for the values you're interested in.

Eg. Filter( MyDim.MyLevel.Members, ((MyDim.CurrentMember, Income) > 1000)
AND ((MyDim.CurrentMember, Income) < 1500 ))

Hope this helps,
- Matt Carroll
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"mike" <michaelhenzi (AT) hotmail (DOT) com> wrote

Quote:
Dear NG

We have a measure called Income. The user now wants to filter the result
as
hereafter:

Example: Income is bigger than 1000 but smaller than 1500 $.

I know that measures can be filtered by select the dimensions. But is it
possible to
filter the returned result again?

Thanks for help

Mike





Reply With Quote
  #3  
Old   
mike
 
Posts: n/a

Default Re: Filtering Measures - 10-17-2003 , 01:21 PM



Thanks Matt

It works fine. (How could I forget the current Member - shame on me).

Thanks
Mike



"Matt Carroll [MS]" <MattCar (AT) online (DOT) microsoft.com> schrieb im Newsbeitrag
news:ueUti5MlDHA.3256 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
You can use the Filter() MDX function to do this. As the first argument,
give it the set of tuples to be filtered. As the second argument, define
a
boolean expression that tests for the values you're interested in.

Eg. Filter( MyDim.MyLevel.Members, ((MyDim.CurrentMember, Income) > 1000)
AND ((MyDim.CurrentMember, Income) < 1500 ))

Hope this helps,
- Matt Carroll
--
This posting is provided "AS IS" with no warranties, and confers no
rights.

"mike" <michaelhenzi (AT) hotmail (DOT) com> wrote in message
news:Og6gdU%23kDHA.1764 (AT) tk2msftngp13 (DOT) phx.gbl...
Dear NG

We have a measure called Income. The user now wants to filter the result
as
hereafter:

Example: Income is bigger than 1000 but smaller than 1500 $.

I know that measures can be filtered by select the dimensions. But is it
possible to
filter the returned result again?

Thanks for help

Mike







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.