Return value selected from a hierarchy (slicer)


I have a product table with the following columns,

Product H1
Product H2
Product H3
Product H4
Product Name

I have then set up the hierarchy in report view - right click the highest level and select ‘New Hierarchy’, add the levels as follows,


I’ve brought in the ‘Product Hierarchy’ into a slicer.

The measure below works fine when a Product Name is selected,

Product Selected = SELECTEDVALUE ( Products[Product Name] )

I’d like the measure to be flexible, so that it can return any selected value - i.e. Product H1 / 2 / 3 / 4
/ Product Name
I’m looking to use this measure in the page heading.

The other issue I’m trying to resolve is when I select say, Product Name26 - the value reported in the slicer does not return Product Name26 - but the full hierarchy

Perhaps there is another way to achieve this?

Product Hierarchy Slicer.pbix (34.8 KB)


The following measure worked,