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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

%d bloggers like this: