Forum Discussion
drwinny
4 years agoHelper I
Checking if multiple trainings are passed
Hi All, I have asked this question before, but I have not been able to solve the problem I have. I need to calculate if each person is certified for Product A, Product B, Product C, Etc T...
- Anonymous4 years ago
Hi drwinny ,
1. Extract Training type from Training ID column:
Training Type = LEFT([Training ID], FIND("Training",[Training ID])-1)2.Create a flag measure—— if passed then 1 else 0:
Flag = var _score=SUMX(FILTER('Data',[User Name]=MAX('Data'[User Name]) && [Training Type]=MAX('Data'[Training Type])),[Training Passed]) var _count=CALCULATE(DISTINCTCOUNT('Data'[Training ID]),ALLEXCEPT(Data,Data[User Name],Data[Training Type])) RETURN IF(_count=_score,1,0)3. Sum the Flag measure of each Training Type:
Passed Person Count = var _t=SUMMARIZE(ALL('Data'),[Training Type],Data[User Name],"Flag",[Flag]) return SUMX(FILTER(_t,[Training Type]=MAX('Data'[Training Type])),[Flag])Final output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable