dbTalk Databases Forums  

Year ->Quarter->Week->Month->Day

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


Discuss Year ->Quarter->Week->Month->Day in the microsoft.public.sqlserver.olap forum.



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

Default Year ->Quarter->Week->Month->Day - 08-23-2003 , 11:29 AM






The time dimension does not give me the option to put week number so
how do I do it? I created a dimension table with the following fields

Date Year Quarter Quarter_Number Month Month_Number
Week Day
1/1/90 1990 Quarter 1 1 January 1
1 1
1/2/90 1990 Quarter 1 1 January 1
1 2

And so forth....

When I build the dimension table using a star schema set up, I spedivy
the following dimension hierarchy

Year
Quarter
Month
Week
Day

It works fine but the month's are in alphabetical order. How do I
prevent this from happening.

Thanks

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

Default Re: Year ->Quarter->Week->Month->Day - 08-24-2003 , 03:36 AM







I faced exactly the same problem and solved like this.



You can create another column in your table named "monthNo"

and assign numeric values against each month from 1 ,2,3....20,21,22..

starting the first month in your table.

Note that I didnt assiged 1..12(12) no.s only. i.e if your data starts

from 1998 and ends in 2003, then January 1998 will be 1 and

january 1999 will be 13, and january 2000 will be 25 and so on.



Now go to dimension editor, select your "month" column

go to properties pane and find the "ORDER BY " property, use ORDER

BY key column.



select the new "monthNo" field from the list.





There is another way to do that, by using VBA functions , by this

way you will not have to create new column.



Please tell me if this worked or not.



Thanks,



Asim Naveed.


--
Posted via http://dbforums.com

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.