views:

17

answers:

1

Can I use the sine function within MDX? I would like to know the sine of a measure.

+1  A: 

You can call into the VBA assembly in SSAS, you'll notice it in the SSAS Server assemblies folder.

Full list of VBA functions is here: http://www.ssas-info.com/analysis-services-articles/50-mdx/2075-vba-functions-in-as2005-mdx

Quick example: http://geekswithblogs.net/darrengosbell/archive/2006/10/29/95332.aspx

Alternatively you could write your own CLR routine, and call that: http://geekswithblogs.net/dotNETPlayground/archive/2007/12/20/117869.aspx

EDIT: It looks like I've assumed you're on MS Analysis Services...If you are this should work, otherwise retag with your exact version?

WITH MEMBER Measures.[SinOne] AS VBAMDX!Sin(1)
SELECT Measures.[SinOne] ON COLUMNS FROM [Cube]
Meff
Perfect! It works! Thanks for the help. (Yes, I am using MS Analysis Services.)
CL23