Forum Discussion
Calculate Other Trained Employees
- 10 months ago
Hi, if it is meant to return the number of distinct employees that completed the same training, you can try this measure,
_Other Trained =CALCULATE(DISTINCTCOUNT('Training'[Employee ID]),'Training'[Training Status] = "Complete",FILTER('Training','Training'[Training No.] = MAX('Training'[Training No.])&& 'Training'[Training Name] = MAX('Training'[Training Name])))
Hi, if it is meant to return the number of distinct employees that completed the same training, you can try this measure,
Thank you MasonMA, this worked! Quick follow-up question- in my real data I have 24 employees who have completed training # 100 and training name A. I want the Other Trained column to show the number 23 (24 total trained - the current row of the employee we are looking at). Is there a way to show that instead of the 1 value that gets summed at the botton?
- MasonMA10 months agoSuper User
Hi,
You may try adjusted Measure as below, i think it would keep the row’s Training No. and Training Name context via those MAX variables and remove the Employee filter using <> CurrentEmployee.
VAR CurrentTrainingNo = MAX('Training'[Training No.])
VAR CurrentTrainingName = MAX('Training'[Training Name])
VAR CurrentEmployee = MAX('Training'[Employee ID])
RETURN
CALCULATE(
DISTINCTCOUNT('Training'[Employee ID]),
'Training'[Training Status] = "Complete",
FILTER(
'Training',
'Training'[Training No.] = CurrentTrainingNo &&
'Training'[Training Name] = CurrentTrainingName &&
'Training'[Employee ID] <> CurrentEmployee
)
)