MDX

There are 4 entries for the tag MDX
SSAS: T-SQL Equivalent for a Many-to-Many relationship
This question came a while ago now in this SSAS forum thread: What is wrong in my query and I thought it was something that may interest other people. Basically it boiled down to trying to find a T-SQL equivalent to the following MDX which is querying a dimension with a many-to-many relationship to the measure. So given the following simple MDX query, what would be the equivalent in SQL? select measures.[Internet Sales Amount] on 0 , [Sales Reason].[Sales Reasons].[Reason Type].Members on 1 FROM ......

Posted On Sunday, May 3, 2009 9:47 PM | Comments (2)

MDX ratio of "current parent" issue
Every now and then on the SSAS MSDN forum, the issue of doing a generic "ratio to parent" calculation comes up. Unfortunately there are a number of problems with the premise of giving users a generic "ratio to parent" measure. The first is that the concept of "parent", by definition, requires a hierarchy and SSAS 2005 supports multiple hierarchies. Consider this query: SELECT Non Empty [Product].[Product].[Produc... on Rows, {Measures.[Sales Ratio]} ON Columns FROM [Adventure Works] I am using ......

Posted On Saturday, July 26, 2008 10:18 AM | Comments (6)

A Rose by any other name - MDX Formatting
A little while ago Jamie posted about how he formats SQL code which happens to be quite similar to the way I do it. But this then lead me to think about the equivalent formatting for MDX. So if I get MDX like the following:with member measures.ptd as 'sum(periodstodate([Date].[... [Date].[Calendar].currentme... Amount] )',format_string = "currency" select {[Measures].[Measures].[Sales Amount] ,measures.ptd} on 0, {[Date].[Calendar].[Month].... ......

Posted On Sunday, June 15, 2008 10:52 PM | Comments (3)

Building a better DMV
Following along on my recent theme of exploring the metadata rowsets and the new Dynamic Management Views (DMV) in SSAS 2008. I have added a new DMV function to the Analysis Services Stored Procedure project (www.codeplex.com/ASStoredP... which is included in the v1.2 release that I put out just before Christmas. This all started off when I decided to look at extending the existing Discover() function to provide for sorting and filtering. And I originally started off by building a wrapper ......

Posted On Wednesday, January 30, 2008 10:45 PM | Comments (3)