dbTalk Databases Forums  

create custom dimension levels

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


Discuss create custom dimension levels in the microsoft.public.sqlserver.olap forum.



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

Default create custom dimension levels - 04-02-2004 , 06:51 PM






I have an "Age" dimension that contains the age (float) value of customers. I want to break it up into ranges instead of listing all existing values so the dimension would look something like below

Ag
0-1
..
10-2
..
20-3
..
Quote:
3
..

What would be a good way to create the dimension level? Any suggestions will be greatly appreciated





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

Default RE: create custom dimension levels - 04-02-2004 , 07:21 PM






Use Grouping

1. In the dimention Editor, add two levels to the dimension, both based on the "age" colum
2. In the top level "age1", put your formula in the Member Key Column & Member Name Column to extract ages under each age grou


----- Tony wrote: ----

I have an "Age" dimension that contains the age (float) value of customers. I want to break it up into ranges instead of listing all existing values so the dimension would look something like below

Ag
0-1
..
10-2
..
20-3
..
Quote:
3
..

What would be a good way to create the dimension level? Any suggestions will be greatly appreciated






Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: create custom dimension levels - 04-03-2004 , 07:55 AM



How would that formula look ?

\Michael Vardinghus

anna <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Use Grouping:

1. In the dimention Editor, add two levels to the dimension, both based on
the "age" column
2. In the top level "age1", put your formula in the Member Key Column &
Member Name Column to extract ages under each age group



----- Tony wrote: -----

I have an "Age" dimension that contains the age (float) value of
customers. I want to break it up into ranges instead of listing all
existing values so the dimension would look something like below.
Quote:
Age
0-10
...
10-20
...
20-30
...
30
...

What would be a good way to create the dimension level? Any
suggestions will be greatly appreciated.







Reply With Quote
  #4  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: create custom dimension levels - 04-03-2004 , 03:42 PM



Interesting.

How would such a formula look....?

anna <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Use Grouping:

1. In the dimention Editor, add two levels to the dimension, both based on
the "age" column
2. In the top level "age1", put your formula in the Member Key Column &
Member Name Column to extract ages under each age group



----- Tony wrote: -----

I have an "Age" dimension that contains the age (float) value of
customers. I want to break it up into ranges instead of listing all
existing values so the dimension would look something like below.
Quote:
Age
0-10
...
10-20
...
20-30
...
30
...

What would be a good way to create the dimension level? Any
suggestions will be greatly appreciated.







Reply With Quote
  #5  
Old   
anna
 
Posts: n/a

Default Re: create custom dimension levels - 04-05-2004 , 11:36 AM



case when age > 30 then '30+' when age > 20 then '21 - 30' when age > 10 then '11 - 20' else '0-10' en

----- Michael Vardinghus wrote: ----

Interesting

How would such a formula look....

anna <anonymous (AT) discussions (DOT) microsoft.com> wrote in messag
news:0AC5EBD1-43B2-4BEF-8A7C-D85D921B9707 (AT) microsoft (DOT) com..
Quote:
Use Grouping
1. In the dimention Editor, add two levels to the dimension, both based o
the "age" colum
2. In the top level "age1", put your formula in the Member Key Column
Member Name Column to extract ages under each age grou
----- Tony wrote: ----
I have an "Age" dimension that contains the age (float) value o
customers. I want to break it up into ranges instead of listing al
existing values so the dimension would look something like below
Quote:
Ag
0-1
..
10-2
..
20-3
..
3
..
What would be a good way to create the dimension level? An
suggestions will be greatly appreciated


Reply With Quote
  #6  
Old   
Tony
 
Posts: n/a

Default RE: create custom dimension levels - 04-14-2004 , 05:21 PM



I finally got it working, however now I can't drillthrough the data. The error message, "Data Source provider error. Incorrect error near the keyword 'from'.; 42000" is displayed. If I change the age dimension back to the old one level age dimension, the drillthough works fine. Here is what I have for the Age dimension

* Age

Member key:
case when "dbo"."tblTempPatient"."AGE" > 30 then '30+' when "dbo"."tblTempPatient"."AGE" > 20 then '21 - 30' when "dbo"."tblTempPatient"."AGE" > 10 then '11 - 20' else '0-10' en

Member name
case when "dbo"."tblTempPatient"."AGE" > 30 then '30+' when "dbo"."tblTempPatient"."AGE" > 20 then '21 - 30' when "dbo"."tblTempPatient"."AGE" > 10 then '11 - 20' else '0-10' en

** Age1

Member key
"dbo"."tblTempPatient"."AGE

Member name
"dbo"."tblTempPatient"."AGE

Any help will be greatly appreciated.

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.