Creating a calculated member based off MDX SELECT statement

Last Post 21 Oct 2013 02:36 PM by rerichards. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
rerichards
New Member
New Member

--
21 Oct 2013 02:36 PM
I want to get a count of widgets where the widget number does not equal -999.

This is the MDX Query:
SELECT NON EMPTY { [Measures].[FactCount] } ON COLUMNS FROM ( SELECT ( -{ [DimWidgets].[WidgetNumber].&[]&[-999]&[-999] } ) ON COLUMNS FROM [DW_SSAS])

I am attempting to use the above MDX Query as a model in which to build a calculated member in the Cube, but I keep getting a result of NULL. The MDX Query gives a correct result of 11. Here is the code I am using (unsuccessfully) to create the calculation in the Cube:

CREATE MEMBER CURRENTCUBE.[MEASURES].[WidgetCount]
AS COUNT(EXCEPT( [Measures].[FactCount], {[DimWidgets].[WidgetNumber].&[]&[-999]&[-999]})),
FORMAT_STRING = "0", VISIBLE = 1, ASSOCIATED_MEASURE_GROUP = 'FactData'

Any idea what the equivalent CREATE MEMBER statement would be for the MDX Query?


You are not authorized to post a reply.

Acceptable Use Policy