Forum Discussion
CarlsBerg999
Helper V
5 years agoLOOKUPVALUE 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
- v-jingzhang
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.