Results 1 to 2 of 2

Thread: MDX Time Issue

  1. #1
    Join Date
    Nov 2008
    Posts
    2

    MDX Time Issue

    Hi, I have a fairly simple cube (in SSAS2005) containing measures for revenue and margin, dimensions for brands, Sku, time, etc. I need to calculate current Year YTD revenue as a factor of the total revenue from all periods in the previous year. E.g.

    Revenue Nov 2008 YTD = £1,500,000
    Revenue Nov 2007 Prior YTD = £1,250,000
    Revenue All periods Prior Year (Nov 2007 > Oct 2008) = £18,500,000

    Result = 8.1%

    Is this possible without having to "hard code" years into the MDX?

    Thanks in advance. . .

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

    Did You Try the MDX Date Functions?

    It seems to me (unless I miss the question significantly) that the YTD(), Parallel(), and other specialized MDX date functions would deliver this without too much trouble.

    If you get a chance, take a look at the articles of my MDX Essentials series

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

    where I do myriad examples of this sort. If you hit a specific obstacle, let me know and we'll work it from there.

    HTH,

    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
  •