ancestor

Returns the ancestor of "member" at "level" or at "integer" number of levels above "member". Note: The result is not guaranteed to be consistent when there is more than one such ancestor.

Syntax

ancestor ( member, level|integer )

Example 1

ancestor ( [TrailChef Water Bag] , 1 )

Result

Cooking Gear

Example 2

ancestor ( [TrailChef Water Bag] , 2 )

Result

Camping Equipment

Example 3

ancestor ( [TrailChef Water Bag] , [great_outdoors_company].
[Products].[Products].[Product type] )

Result

Cooking Gear