@kkLaRue81
The code I've pasted using the sample data as shared returns below result.
....except that when copy/pasting the sample data I've missed one semicolon - add it so the data section ends with 4 such semicolons.
If you run the code against your real data not using the $upcase3. informat then you need to ensure that all the Yes and No strings are set up uppercase YES and NO before using the whichc() function