Results 1 to 3 of 3

Thread: Most recent entry in a given time period

Hybrid View

  1. #1
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Have You Considered the MDX Time Functions?

    The MDX time functions exist to do precisely what you seem to want to do - and much, much more. Take a look at the several articles I've written surrounding these functions within my MDX Essentials series here at Database Journal. The index page is here:

    http://www.databasejournal.com/article.php/1459531

    Take a look at these (which include working Analysis Services 2k examples, conveniently enough), and get back once you have specific questions. I'm sure that a solution will be prettyy straightforward.

    Good Luck!

    Bill

  2. #2
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Would this be a start?

    SELECT ClosingPeriod([Date].[Calendar].[Month], [Date].[Calendar].DefaultMember) ON 0 FROM [Sales Summary] WHERE ([Measures].[Sales Amount])

    This will give the "last populated month," and will need to be altered to your data source / time requirement, etc.

    HTH - if you can specify furtther needs, please let us know ...

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •