VALUES() returns a table of values. In your case, you are using this table as the table parameter (the first parameter) inside SUMX. SUMX is an iterating function. It steps through every row of the table and performs the evaluation (the second parameter) for each row in the table (it’s more complex than this, but this is sufficient to understand in this case). By the time the second parameter inside SUMX is evaluated, there is only a single value for TABLE_Name[Team]. It was SUMX that selected the single value before doing each calculation through the iteration. But then you use VALUES again inside parameter 2. This has the effect of turning the single, scale value for this column back into a table. You can’t do a comparison between a table and a scalar value; that is what you are doing. The solution is simple. Because you are inside SUMX, you don’t need VALUES.
Rich (BB code):
SH-MET% =
SUMX (
VALUES ( Table_Name[Agent_name] ),
IF (
[FINAL SCORE] >= 0.95
&& Table_Name[Team] = "Sales",
1,
0
)
)