dbTalk Databases Forums  

Creating a dimension based on a range of values

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


Discuss Creating a dimension based on a range of values in the microsoft.public.sqlserver.olap forum.



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

Default Creating a dimension based on a range of values - 10-13-2005 , 03:46 PM






I am new to OLAP and I was wondering if it is possible to create a dimension
in Analysis Services 2005 based on a range of values for a given field in a
Fact table.
Example:
Field Name: Quantity
Dimension Name: Quantity Range
Dimension Values: 0-100
101-200
201-1000
Quote:
1000
The only solution I see now is to denormalize Quantity into a new field
QuantityRange that is computed based on the value of the quantity
1: 0-100
2: 101-200
3: 201-1000
4: > 1000
The values 1 to 4 would be my dimension.

Thanks al lot



Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Creating a dimension based on a range of values - 10-13-2005 , 08:22 PM






If you are defining the thresholds, then Yes, you must create such a
structure. It could be a simple view with some UNION statements. Here is an
example:

CREATE DimVendorType AS
SELECT 'S' AS Vendor_Type_ID, 'Source Vendor' AS Vendor_Type
UNION
SELECT 'O' AS Expr1, 'Original Purchase Vendor' AS Expr2
UNION
SELECT 'P' AS Expr1, 'Purchase Vendor' AS Expr2
UNION
SELECT 'R' AS Expr1, 'Return Vendor' AS Expr2
UNION
SELECT 'D' AS Expr1, 'Distribution Center Vendor' AS Expr2

If you want AS to use the DM algorithms to create the thresholds for you,
then just set the DiscretizationMethod property to automatic.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"carlos" <carlos (AT) discussions (DOT) microsoft.com> wrote

Quote:
I am new to OLAP and I was wondering if it is possible to create a
dimension
in Analysis Services 2005 based on a range of values for a given field in
a
Fact table.
Example:
Field Name: Quantity
Dimension Name: Quantity Range
Dimension Values: 0-100
101-200
201-1000
1000
The only solution I see now is to denormalize Quantity into a new field
QuantityRange that is computed based on the value of the quantity
1: 0-100
2: 101-200
3: 201-1000
4: > 1000
The values 1 to 4 would be my dimension.

Thanks al lot




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.