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
You should have a separate table that contains all possible Traning ID's. The a calculated column or measure that satisfies you requirement can be generated. I have two questions:
1. Do yo want a calculated column or a measure?
2. Please elaborate on the company's issue. If the person has results in two different companies how shall we proceed?
Please copy and paste the same sample data so we can use it for the analysis. Thank you!