'How to do distinct count and if else statement in quicksight?

New in quicksight. Here is my problem:

Score : > 98% = Pass, < 98% = Fail

ID: I have duplicates of IDs on my data

score id
95% 1
95% 1
98% 2
97% 3
97% 3

I only want to count distinct ids with passing score? How do I write a formula for that?

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source