Try to add attr in calculation
if attr([key])=1 and attr([type])='Pass' then sum (count) end
You may try this
COUNTD(IF [Key]=1 AND [Type]='Pass'
Let us know if this help else share some sample mock up data in packaged workbook.