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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CarlsBerg999
Helper V
Helper V

LOOKUPVALUE not working inside a filter

I have a problem with the Filter of the measure below. The LOOKUPVALUE -part of the measure doesn't work properly.
 
Selected Employee Peer Group = CALCULATETABLE(SUMMARIZE(Employee Masterdata','Employee Masterdata'[Job]),
FILTER('Employee Masterdata','Employee Masterdata'[Job]=
LOOKUPVALUE('Employee Masterdata'[Job],'Employee Masterdata'[Employee],SELECTEDVALUE('Employee Masterdata'[Employee]))))
 
If i replace the LOOKUPVALUE -part of the function with "Scientist", the code works. If i use the LOOKUPVALUE -part of the dax alone, it returns "Scientist". Why doesn't the LOOKUPVALUE work in the measure properly?
 
1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @CarlsBerg999 

 

I'm a little confused about your measure. What does it want to get? There is only one table involved in this measure. If you want to return the Job related to an Employee, you can use SELECTEDVALUE('Employee Masterdata'[Job]) to get the result easily. Or you can even drag the Job column into a visual directly.

 

If I don't understand it correctly, can you share some dummy data to explain your expected result more clearly? 

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.