Something like this?
WITH
MEMBER
[Measures].[Custom] AS
AVG(EXCEPT([Dimension].[HIERARCHY].CURRENTMEMBER.CHILDREN, {[Dimension].[HIERARCHY].CURRENTMEMBER.FIRSTCHILD,[Dimension].[HIERARCHY].CURRENTMEMBER.LASTCHILD }), [Measures].[Your Measure])
SELECT
{
[Measures].[Custom]
} ON 1
FROM [Your Cube]
WHERE (
[Dimension].[HIERARCHY].Some_Member)