Forum Discussion
hans263
4 years agoNew Member
Highest score based on 2 variables
Hi experts, I have an issue regarding a table with staffmembers, training they followed and the scores given for each training. Table looks like this: The result should be that for each depar...
- 4 years ago
Hi hans263
Please refer to attached sample file with the solutionCount of Highest Scores = VAR CurrentScore = SELECTEDVALUE ( 'Table'[TrainingTypescore] ) RETURN COUNTROWS ( FILTER ( VALUES ( 'Table'[Staffmember] ), CALCULATE ( MAX ( 'Table'[TrainingTypescore] ), ALL ('Table'[NameTrainingFollowed], 'Table'[TrainingTypescore] ) ) = CurrentScore ) ) + 0
tamerj1
Community Champion
4 years agoHi hans263
Please refer to attached sample file with the solution
Count of Highest Scores =
VAR CurrentScore = SELECTEDVALUE ( 'Table'[TrainingTypescore] )
RETURN
COUNTROWS (
FILTER (
VALUES ( 'Table'[Staffmember] ),
CALCULATE ( MAX ( 'Table'[TrainingTypescore] ), ALL ('Table'[NameTrainingFollowed], 'Table'[TrainingTypescore] ) )
= CurrentScore
)
) + 0- hans2634 years agoNew Member
Additionale question: Current Score holds the maximum of found results. If I want to use that value, how can I get this back into a Column? Or otherwise, the number of unique staff members for echt department. OPS=1, Sales=3
- tamerj14 years ago
Community Champion
hans263
Modified file attachedCount of Highest Scores = SUMX ( VALUES ( 'Table'[NameTrainingFollowed] ), CALCULATE ( VAR CurrentScore = SELECTEDVALUE ( 'Table'[TrainingTypescore] ) RETURN COUNTROWS ( FILTER ( VALUES ( 'Table'[Staffmember] ), CALCULATE ( MAX ( 'Table'[TrainingTypescore] ), ALL ('Table'[NameTrainingFollowed], 'Table'[TrainingTypescore] ) ) = CurrentScore ) ) + 0 ) )- hans2634 years agoNew Member
Awesome. Last question. I finaly want to show the response. So in fact Count of Highest Score devided by the total number of staff members for a give department in %.