Вот, пожалуйста,
///Will Display 999 for any member apart from All
with Member [Measures].[My Measure]
AS
iif([Customer].[Country].currentmember.Properties ("Member_Value",TYPED)='All Customers',[Measures].[Internet Sales Amount] , 999)
select {[Measures].[Internet Sales Amount],[Measures].[My Measure]}
on columns,
[Customer].[Country].members
on rows
from [Adventure Works]
///Will display 999 for any member
with Member [Measures].[My Measure]
AS
iif([Customer].[Country].currentmember.Properties ("Member_Value",TYPED)='WhatEver', 999, 999)
select {[Measures].[Internet Sales Amount],[Measures].[My Measure]}
on columns,
[Customer].[Country].members
on rows
from [Adventure Works]
// Ниже запросы помогают проверить, является ли член частью иерархии /////////////////////////////////////////////////////////////////////////////////////////
//Query checks if a Member is part of a hierarchy
with MEMBER TestIFAValidMember
as
[Product].[Subcategory].[InvalidMember].UniqueName
MEMBER TestIFAValidMember2
as
[Product].[Subcategory].[Caps].UniqueName
select {TestIFAValidMember,TestIFAValidMember2}
on columns
FROM [Adventure Works]
Вы также можете попробовать
WITH MEMBER MEASURES.NotMember AS
IsSibling([Product].[Category].CURRENTMEMBER, [Product].[Category].[Invalid])
MEMBER MEASURES.ISMember AS
IsSibling([Product].[Category].CURRENTMEMBER, [Product].[Category].[Bikes])
SELECT {MEASURES.NotMember,MEASURES.ISMember} ON 0,
[Product].[Category].MEMBERS ON 1
FROM [Adventure Works]