BookmarkSubscribeRSS Feed
metalray
Calcite | Level 5
Hello,

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?
4 REPLIES 4
AngelaHall
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
metalray
Calcite | Level 5
Hi Angela,

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

//ID-Year-Quarter-Month-Week-Day
//1--2010---------1-------1-----1--...
//2--2010---------1-------1-----2--...
//3--2010---------1-------1-----3--...
//4--2010---------1-------1-----4--...
//5--2010---------1-------2-----1--...
//6--2010---------1-------2-----2--...
//7--2010---------1-------2-----3--...
//8--2010---------1-------2-----4--...
//...
//11-2010---------2-------4-----1--...
//12-2010---------2-------4-----2--...
//13-2010---------2-------4-----3--...
//14-2010---------2-------4-----4--...

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?
AngelaHall
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.
http://support.sas.com/documentation/cdl/en/olapug/59574/HTML/default/viewer.htm#a003229698.htm

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
metalray
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.

Regards,
Bob

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 851 views
  • 0 likes
  • 2 in conversation