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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
JS00
Frequent Visitor

Measure to display name of employee based on selected employee ID

Hello,

 

I have a table (Sales) with Employee ID and their sales, and another table (Employee) with Employee's names/ID. (Employee). 

Employee table has a one to many relationship with the Sales table (linked through the ID column). 

I want to display the employee's name based on the employee ID selected, if none selected, I don't want to display anything. 

I tried the measure of SELECTEDVALUE('Employee'[Name], ''), but it isn't working.

 

Thank you in advance.

 

 

 

2 ACCEPTED SOLUTIONS
AnkitaaMishra
Super User
Super User

Hi @JS00 , 

you can use below DAX to create the measure : 
if you select any customer ID, it will give you the customer name or if nothing is selected then it will be blank.

ankita_mishra_9_0-1719323501235.png

 

View solution in original post

qqqqqwwwweeerrr
Super User
Super User

Hi @JS00 

 

I am not sure wether you want single select or multiple selection i have tried which works for both single or multiple selection. 
Create this measure: 

select name = CALCULATE ( IF ( ISFILTERED ( emp_name[ID] ), 1, 0 ), ALLSELECTED ( emp_name ) ) once you create this apply this to filter and name in table 
check below image:
qqqqqwwwweeerrr_0-1719324908680.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more interesting solution here: www.youtube.com/@Howtosolveprobem

Regards

View solution in original post

2 REPLIES 2
qqqqqwwwweeerrr
Super User
Super User

Hi @JS00 

 

I am not sure wether you want single select or multiple selection i have tried which works for both single or multiple selection. 
Create this measure: 

select name = CALCULATE ( IF ( ISFILTERED ( emp_name[ID] ), 1, 0 ), ALLSELECTED ( emp_name ) ) once you create this apply this to filter and name in table 
check below image:
qqqqqwwwweeerrr_0-1719324908680.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more interesting solution here: www.youtube.com/@Howtosolveprobem

Regards

AnkitaaMishra
Super User
Super User

Hi @JS00 , 

you can use below DAX to create the measure : 
if you select any customer ID, it will give you the customer name or if nothing is selected then it will be blank.

ankita_mishra_9_0-1719323501235.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.