BookmarkSubscribeRSS Feed
Calcite | Level 5

I was just building my time dimension and came accross this error:

The level type of "WEEKS" exist in the hierarchy.
The "WEEKS" type cannot be used with levels containing a
type of "HALF_YEAR", "QUARTER" or "MONTH".

I dont undertand why this is not possible? It seems logical to have weeks as a
level below months and before days, doenst it?
SAS Employee
I think the reasoning behind not allowing this is which week belongs in which month? You'd end up either with a bunch of half weeks or weeks under a month that had only a day - depending on how SAS built the processing.

~ Angela
Calcite | Level 5
Hi Angela,

Thanks for the reply.
My period dimension looks a bit like that (not going into the details of days):


In my case the period dimension is full developed with all the days of the months and all the quarters of
a year up to 2016. The MDX query only selects the periods that are NON EMPTY. So the user
never sees quarters, months, weeks or days that has not data. If I drill down to week for row/id 14 and there
is only data for that week and only for monday then I would only be able to drill down to that week in the first place (the other week
are not shown in that month) and see the data for monday.

Since this is a flat hierarchy I can easily make out which week belongs to which month.
Sorry, but I dont yet undertand what the problem is?
SAS Employee
Weeks only work in the hierarchy 'Year'-'Week' or 'Year'-'Week'-'Day'.

Supplied hierarchy screenshot has a partial listing of these two available hierarchies.

The 'Week' TIME item is for a year 1-52 (or 53) so the data you posted below is week of month.

An alternative would be to utilize a 'STANDARD' dimension rather than 'TIME'.

~ Angela
Calcite | Level 5
Hi Angela,

Thanks for the reply. I still dont undertand why SAS decided its not sensible
to support Year-Quarter-Months-Week-Day (as far as I remember Hyperion Essbase does).

You are right, I could use a STANDARD dimension instead of the TIME one, but I would need to write time series calculation by myself in MDX if required.




Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2 in conversation