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 agoSure.
Share your formulas for both Operator Name and for Operator Total Hours.
- ABC113 years ago
Resolver I
Only this is not working.Operator Total HRs =CALCULATE(sum('LEM FACT with query'[LABORHRS]),ALLEXCEPT('LEM FACT with query','LEM FACT with query'[EMPLOYEE_NAME],'LEM FACT with query'[WORKDATE]))Operator Name formula is workingThanks- jgeddes3 years ago
Super User
I just needed to see what you named the Operator Name column.
The name column that is referenced in the ALLEXCEPT statement needs to be the "Operator Name" column, not the original Employee Name column.- ABC113 years ago
Resolver I
When I change to OpratorName column still not workingOperator Total HRs =CALCULATE(sum('LEM FACT with query'[LABORHRS]),ALLEXCEPT('LEM FACT with query','LEM FACT with query'[OparatorName],'LEM FACT with query'[WORKDATE]))OparatorName =var _nameLookUp=LOOKUPVALUE('LEM FACT with query'[EMPLOYEE_NAME],'LEM FACT with query'[LABORCODE],'LEM FACT with query'[EQUIPLABORCODE])Returnif(or(ISBLANK(_nameLookUp), _nameLookUp=""),'LEM FACT with query'[EMPLOYEE_NAME],_nameLookUp)Please,Thanks for your help