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
Willvj
New Member

DAX measure that returns the value of the selected node in a decomp tree

I have a hierarchy table set up like this:

Willvj_0-1686945355202.png

Related to an employee table by the 'ORG' column

Willvj_1-1686945395497.png

I've tried using the SELECTEDCOLUMN, SELECTEDMEASURE, ALLSELECTED, and VALUES functions.

The "best" result I got was with the SELECTEDVALUE function, using the ORG column from my hierarchy table as an argument. However, it only returns a value when the last node is selected because SELECTEDVALUE only returns a value when only one value is selected. I wonder if there is any logic I could use to make this function or another one to return the ORG of the previous nodes when selected.


I need this to count the number of employees that are related only to the selected node and not all emplyoees from sub-categories like its shown here:

Willvj_2-1686945801253.png


When UFA from L2 hierarchy is selected it should count 3 employees not 15.



Sample file


0 REPLIES 0

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.