Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
LP280388
Resolver II
Resolver II

How to get selected value from a Hierarchy Slicer

Hi Team,

 

Need a help in fetching the selected value from a hierarchy slicer. For example : I have the data as below.

 

I need to show the max hierarchy selected.  In the second image below, abc2 is selected and thats the max level selected which need to be shown in a single card visual. 

 

In the third image below : abc5 is selected and thats the max level selected by the user which needs to be shown.  

 

Kindly help me how this can be achieved.

 

LP280388_0-1658317513934.png

 

LP280388_1-1658317659409.png

LP280388_2-1658317728243.png

 

 

5 REPLIES 5
Anonymous
Not applicable

Create index column in your table for Employees.

 

then use the below dax to get desired output.

 

Selected Value = 
VAR MAXIndex = CALCULATE(MAX(Sampl[Index]),ALLSELECTED(Sampl))
RETURN
IF(MAX(Sampl[Index]) = MAXIndex, MAX(Sampl[Emp]))

 

Do accept the solution if it fulfills your need.

 

Thanks,

Mohan V.

@Anonymous Thanks for the response.

 

I created the index column and added the measure. but it gives the wrong name.  Could you please let me know the index should be on Employee ID?  its not giving right answer.

Also, the hierarchy slicer has Manager Name and Manager's Manager name as Level2 and Level1.

Anonymous
Not applicable

 @LP280388 Share your sample pbix file

Yes you should create index on based on Emp.

Mohan1029_0-1658325541856.png

 

Mohan1029_1-1658325575481.png

 

 

@Anonymous Thanks for the detailed response. 

In the below, it should show selected value as abc4, abc5, abc2, abc3

LP280388_0-1658332602333.png

 

In the below it should show, abc2 as selected value

 

LP280388_1-1658332690497.png

 

 

Anonymous
Not applicable

@LP280388 it would be better that you provide detailed information about what you are looking for.

 

The ask you mentioned in question can be solvable by the given solution.

Mohan1029_0-1658334260206.png

Provide more details regarding the above image output that you are looking for.

 

 

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.