Someone had the following issue with MDX using a formula applied to shared members in a dimension and I had the same issue--basically you need to use the contains () function.  
case when 
is(Contains([Dimension of shared members].Currentmember, {member set including shared members}  )
If you use ISANCESTORS it won't work!
Then it worked for me beautifully. 
