Hi @vijaylnyadav ,
main issue seems to be the split between records for "all failed" subjects and the remaining records. I used two Summarize tools to count the number of fails and the total number for each subject and a Join tool (left output anchor) to select only the subjects with different numbers. For subjects with #fails = #total, I added an additional row with "ALL" as roll number.
Let me know if it works for you.