I have been out of SSAS for at least a year now and my MDX skills are very rusty. Basically, what I am trying to do is create a custom calculated member that needs to access the value of an dimension attribute member and some other measures. Here's what I have so far:
CREATE
MEMBER CURRENTCUBE.[MEASURES].[Molding - Mach % Std (Schd Hrs)]AS MemberValue
*
([Dim Machine Availability Details].[Availability Details - Scheduled Status].&[Scheduled],
[Measures].[Availability - Scheduled Status Duration Hrs])
)
,
FORMAT_STRING
= "Percent",
NON_EMPTY_BEHAVIOR
= { },
VISIBLE
This is the formula I am trying to convert to MDX:
= 1 ;
PcsRTS / (PcsPerHr * Scheduled Hours)
The PcsRTS is a measure. And Scheduled Hrs derived by slicing a ScheduledStatusDurationHours measure by a ScheduledStatus dimension attribute.
PcsPerHr is a Product attribute. It will be a number like 15 or 5.35, etc...
What I am trying to do (which isn't in the code yet) is only show the value if the user has included slicing the measure by Product Code (ie, an attribute of the Product dimension). In other words, the Product Name attribute must be part of the slice group.
What's happening is that the [Dim Product].[Product - Pieces Per Hour].MemberValue is returning "All" which, of course, causes the math to blow up. I don't know how to format the MDX to get the calculation to return what I want...
Any help would be really appreciated!
Thanks!
Jeff Ptak
Mooresville, NC
[Measures].[Molding - Quantity RTS]
/
( [Dim Product].[Product - Pieces Per Hour].