Topic
2 replies Latest Post - ‏2010-11-08T23:07:04Z by SystemAdmin
CgnsUsr
CgnsUsr
1 Post
ACCEPTED ANSWER

Pinned topic Create Day of week

‏2010-08-02T20:53:04Z |
How can I create day of week in the current time dimension?
I have created time dimension - year, month and day and would like to include a level 'day of week' which will give the day of week (Mon, Tues...) for the chosen date.
I will appreciate any kind of help!

Thanks in advance.
Updated on 2010-11-08T23:07:04Z at 2010-11-08T23:07:04Z by SystemAdmin
  • Natalie.Vassar
    Natalie.Vassar
    1 Post
    ACCEPTED ANSWER

    Re: Create Day of week

    ‏2010-11-08T22:59:19Z  in response to CgnsUsr
    CgnsUsr wrote:
    How can I create day of week in the current time dimension?
    I have created time dimension - year, month and day and would like to include a level 'day of week' which will give the day of week (Mon, Tues...) for the chosen date.
    I will appreciate any kind of help!

    Thanks in advance.

    I have the issue which is similar to what you have faced, Have you got the answer? Can you share it with us? I've been always concerned about it.
    • SystemAdmin
      SystemAdmin
      280 Posts
      ACCEPTED ANSWER

      Re: Create Day of week

      ‏2010-11-08T23:07:04Z  in response to Natalie.Vassar
      Your best option is to store the values for the day name in your time dimension in the database. However, if you cannot modify the time dimension then you can use an expression to retrieve the day name from the date field in your time dimension. You will likely need do use a database function to get the day name. For example, with Oracle you might use the to_char function.

      If you are using a dimensional model you would then include the day name as an attribute of the day level in your time dimension. Creating a full level for the day name would break the regular hierarchical structure flowing from Month to Day and this is not what you would want.