Is there a reason you can't use a Drill-down group? You can create groups on the Dimensions tab of the properties window. Add the dimensions that make up your hierarchy to the group and use the group as a dimension in your chart. If you click on a value in the group dimension the chart will drill down to the next level of the hierarchy.
If you use =GetCurrentField(MyGroup) then the name of the field is used as value instead of as field name for the dimension. It's not very basic, so don't worry about missing something. I first tried without the $(= too. I saw what happened and tried using dollar-expansion next. That did gave me the result I wanted.