dbTalk Databases Forums  

Dimension members

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


Discuss Dimension members in the microsoft.public.sqlserver.olap forum.



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

Default Dimension members - 10-17-2003 , 06:54 AM






I would like to create dimension with members which are
ranges.
For exmple if I use FoodMart 2000 example, I would like to
add to cube Sales dimension [Sales Ranges] with members:
store sales < $5, $5-$15, $15-$50 and sales >$50.
The idea is to retrieve number of sales between these
ranges, their total amount, etc.

Is this possible? and could you tell me how I can do that
without adding column (which contains range of sale) to
the database.

Best

Svetlin Grancharov

Reply With Quote
  #2  
Old   
Darren Drysdale
 
Posts: n/a

Default Re: Dimension members - 10-17-2003 , 07:25 AM






You can't add the column to the actual dimension table? That is what I'd
recommend..

Alternatively create the memebr usign SQL case stataments within the
dimension editor window - create a a new level (e.g. 'range' within the
customer dimension) and edit the definition (customer.customer name) to look
like case when sales between 0 and 5 then '< 5'... etc etc

HTH

Darren


"Svetlin Grancharov" <sgrancharov (AT) frontsys (DOT) com> wrote

Quote:
I would like to create dimension with members which are
ranges.
For exmple if I use FoodMart 2000 example, I would like to
add to cube Sales dimension [Sales Ranges] with members:
store sales < $5, $5-$15, $15-$50 and sales >$50.
The idea is to retrieve number of sales between these
ranges, their total amount, etc.

Is this possible? and could you tell me how I can do that
without adding column (which contains range of sale) to
the database.

Best

Svetlin Grancharov



Reply With Quote
  #3  
Old   
malcolm k
 
Posts: n/a

Default Re: Dimension members - 10-21-2003 , 11:05 AM




Programatically create a dimension with the value from the fact table as
the first column and the range as the second column. When designing the
cube, join the fact to the dimension using the orginal value. The cube
can be built either includingor excluding the detailed lines i.e. it
could be built with only the range if needed.
Major problem is that you may end up with a large dimension table as the
values will be very varied.
This sytem works fine if there are a limited number of values e.g. from
1 to 100 and building a quartile dimension as there would only be 100
rows in the dimension table with a hierachy as required.
Try running a select distinct on the value column and see how many rows
you get.

You could also try creating a fact table with the ranges in directly
rather than using your existing fact (providing you don't want the low
level values?).


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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.