Im a total newbie to Analysis Services and MDX, so please bear with me.
This code works:
IIF(Ancestor([Product].CurrentMember,[Product].[Category]).Name =
"Bread","Bring","Don't Bring")
So it would seem to me that this code would be syntactically correct, but
its not:
Ancestor ([Product].CurrentMember,[Product].[Category],1)
Can someone please assist?
TIA, ChrisR
Darren Gosbell - 01 Mar 2006 10:55 GMT
No, it's not syntactically correct. Ancestor() expects 2 parameters, not
3.
From Books On Line:
Level
Ancestor(«Member», «Level»)
Returns the ancestor of «Member» from the dimension level specified in
«Level».
Distance
Ancestor(«Member», «Numeric Expression»)
Returns the ancestor of «Member» that is «Numeric Expression» steps away
in the hierarchy.
So you either need to tell the ancestor function which level to get the
ancestor from or the number of levels to walk up the hierarchy

Signature
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell
> Im a total newbie to Analysis Services and MDX, so please bear with me.
>
[quoted text clipped - 11 lines]
>
> TIA, ChrisR