MDX expression for SSAS dynamic date dimension

Hi All,

I am hoping to create a dynamic date dimension for a SSAS cube in Visual studio. The example for them would be Current Month, Previous Month, and Current year etc. The expected result is that users don't need to manually select the from and to date for the measure and once the corresponding Dynamics date dimension is selected, the corresponding date information would apply. Any advice on how to create this kind of date dimension would be highly appreciated, thanks.


LVL 37
bbaoIT ConsultantAsked:
Who is Participating?
PortletPaulConnect With a Mentor Commented:
Do you have a calendar table of any sort already?

Maybe look at this youtube video (SQL 2012 Analysis Services Calendar Dimension) which demonstrates a Visual Studio  wizard that will help you build these for you, even if you don't have 2012 it may be worth the few minutes viewing, as it touches on such topics as start of week, fiscal calendars, manufacturing calendars and so on.

For a more do-it-yourself approach jimhorn's article is relevant, and I know he also intends to expand on this topic: Date Fun, Part One:  Build your own SQL calendar table to perform complex date expressions

If you like recursive CTE's and wanted to trail a simple calendar approach you might get ideas from this tidy blog:  T-SQL: Using common table expressions (CTE) to generate sequences
bbaoIT ConsultantAuthor Commented:
Thanks a lot for your reply. The articles are very helpful.
>>dbo.hours, dbo.minutes, etc.,
good points - see it in part2 I trust :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.