Forum Discussion
ABC11
Resolver I
3 years agoLook up laborcode in another row in same table in Dax
Hi, I have laborcode(employee no), name and laborhrs in one row And euipment, equipmenthrs , equilaborcode in different row. Laborcode and equilaborcode is same. I would like to identify operato...
- 3 years ago
You can change Operator Total Hrs2 to Return _calc now.
jgeddes
Super User
3 years agoYou can add the following calculated columns...
operatorName =
var _nameLookup =
LOOKUPVALUE(codeTable[name],codeTable[Laborcode],codeTable[Equipmentlaborcode])
Return
IF(
OR(ISBLANK(_nameLookup), _nameLookup=""),
[name],
_nameLookup
)
and
Operator Total Hours =
CALCULATE(
SUM(codeTable[laborhrs]),
ALLEXCEPT(codeTable, codeTable[operatorName], codeTable[Workdate])
)