Forum Discussion
Checking if multiple trainings are passed
- 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.
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.
- drwinny4 years ago
Helper I
Anonymous and amitchandak Both of your suggestions helped but Eyelyn9's solution gave me the "certified count" that I was looking for.
I just need to breakdown each step of this process so I can understand how to solve these types of questions for myself.
Thanks again for taking time to help me with this request.