HierarchyIndex returns a 1-based index if the hierarchy is in the supplied dimension, 0 otherwise.
In this video, HierarchyIndex will be used to retrieve the dimension hierarchy index value and apply it in the rule to populate the Employee Salaries cube.
Rules
Version 11 and 12
HierarchyIndex(DimName, HierName)