How count present date count based on row by row

Hi @supermanPunch ,

This solution once same count appear na always pick first item , i want random anyone data

Expected output:
XXX = 2
YYY = 2
ZZZ = 4
AAA=3
BBB=2
Any one of data like XXX or YYY or BBB

Please help me for this

Regards,
Raja G