dbTalk Databases Forums  

MDX: Selecting range of members by key

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


Discuss MDX: Selecting range of members by key in the microsoft.public.sqlserver.olap forum.



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

Default MDX: Selecting range of members by key - 10-27-2004 , 04:10 AM






Hi.

I have a Commodity dimension:

CommodityGroup
Commodity

The caption of the Commodity level members is "Name" + ' ' + "Commodity_Nr"
The key is "Commodity_Nr"
The level is ordered by name (alphabetical).
The problem is that my users want to select ranges of commodity numbers to
display: SELECT [Commodity].&[100]:[Commodity].&[1000]...
New commodities are added into these ranges and they need to be displayed
too. I cannot solve this by adding a level that groups commodities by
numeric groups (group 100-1000, 1000-1200 etc).
So: Is there any way to select members by the range of its key and not how
its ordered in the level?

Any help appreciated,

Peter



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

Default RE: MDX: Selecting range of members by key - 10-27-2004 , 08:05 AM






Hello Peter,
you could add a virtual dimension based on member keys.

Or you filter by Key
(Properties are always stored as strings).

HTH
Jörg

Try this in MDX Sample App:

with member measures.CustKey as 'customers.currentmember.properties("key")'

Select

Filter(customers.[name].members,clng(measures.CustKey) >= 1000 AND
clng(measures.CustKey)< 1100 )

on 0 from sales

where(measures.CustKey)

"Peter Koller" wrote:

Quote:
Hi.

I have a Commodity dimension:

CommodityGroup
Commodity

The caption of the Commodity level members is "Name" + ' ' + "Commodity_Nr"
The key is "Commodity_Nr"
The level is ordered by name (alphabetical).
The problem is that my users want to select ranges of commodity numbers to
display: SELECT [Commodity].&[100]:[Commodity].&[1000]...
New commodities are added into these ranges and they need to be displayed
too. I cannot solve this by adding a level that groups commodities by
numeric groups (group 100-1000, 1000-1200 etc).
So: Is there any way to select members by the range of its key and not how
its ordered in the level?

Any help appreciated,

Peter




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.