Forum Discussion
CarlsBerg999
Helper V
5 years agoUsing slicer to select a related value
Hi, I have a table with Employee names and Jobs: Employee Name Job Todd Analyst Frank Controller Jessie Analyst Another table has Employee Names and total hours: ...
v-xiaotang
Community Support
5 years agoHi CarlsBerg999
Try this.
Measure =
var _job=SELECTEDVALUE(Table1[Job])
return
CALCULATE(SUM(Table2[Hours]),FILTER(ALL(Table2),Table2[Job]=_job))
Result:
Or if you want to modify the original measure, you can use function ALL().
Peer Group Logged Hours = CALCULATE(
SUM('Table2'[Hours]),
FILTER(ALL('Table2'),'Table2'[Job]=LOOKUPVALUE('Table1'[Job],'Table1'[Employee Name],"Jessie")))
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.