Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to use currentmem properties to use the dim value as calc measu

Status
Not open for further replies.

eo

MIS
Apr 3, 2003
809
Hi,

SSAS 2008. I am trying to use currentmember properties on a dimension attribute value as a calculated measure. The dimension has (amongst other) two attributes. Balance and Status. Balance is a value that could have been in a fact table, but is in the dimension due to many other reasons I will not go into here (I will not bore you).

The dimension looks something like this:

Code:
DimKey  Balance  Status
1       200.00   H
2       250.00   C
3       165.00   C
4       220.00   C

I must now create a measure from the attribute [Dimension].[Balance] where the {Dimension].[Status] = C

I have tried many calculated member variations, but no luck. Can anyone see anything obviously wrong in my MDX syntax?

Code:
CREATE MEMBER CURRENTCUBE.[MEASURES].[BalanceMeasure]
    AS SUM([Dimension].[Balance].CurrentMember.Properties("key", typed)
           ,[Dimension].[Status].&[C]),
   FORMAT_STRING = "#,#",
   VISIBLE = 1;

Thanks

EO
Hertfordshire, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top