VBA Functions in MDX

Greg Galloway has done some really cool things on the Analysis Services Stored Procedure Project which I’ll be blogging about soon, but in the meantime as part of his research he’s found an interesting white paper by Irina Gorbach on the use of VBA functions in MDX and which ones have been implemented as internal MDX functions to improve performance. Here’s the MSDN Forums thread as background:
And here’s the paper itself:

7 responses

  1. Pingback: Up-to-date list of VBA Functions in MDX « Chris Webb's BI Blog

  2. Do you still have the list and background information on VBA functions? I would be interested in because I got a strange behaviour with the datepart function in MDX.
    member test as vba!datepart(“w”,’2017-04-24′,2,2 )
    member test2 as vba!datepart(“w”,’2017-04-24′ )
    on 0

    The query returns on Server A
    test1 test2
    1 2
    and Server B
    test1 test2
    1 1

    where it should always be 1,2 in my Opinion

    Both servers are SSAS 2012

      • My first guess were locals as well, but they are the same. At least the obvious locals settings.

        At second thought, my guess was locals do not make much sense because the VBA description stats the optional parameter FirstDayOfWeekValue has a default on Sunday and is not bound to any local settings.


        That is why I hoped to find more info here if mdx datepart is handled internally and if so maybe the implementation is a little different than the regular VB version?

  3. I figured it out it depends on the local settings of the “log on as” account of the SSAS services. Not my obvious choice 🙂

Leave a Reply to Simon W. Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: