Hi athorat,
based on your comments I did update the answer, so try this:
index="prod" sourcetype="PRD:syslog" PROXYNAME="UAPI" URI="/vehicle/DeviceFullFillment" TransactionStatus=fail OR TransactionStatus=success
| stats count(TransactionStatus) AS myCount by PolicyNumber, TransactionStatus
| where myCount>="2"
| table PolicyNumber TransactionStatus
This will search all PolicyNumber which have either TransactionStatus=fail or TransactionStatus=success and count them by PolicyNumber , the where claus will get back all PolicyNumber which have a count of more or equal of 2 and the shows the result as table .
Hope this matches your requirements ...
btw values are case in-sensitive that's why you can search for TransactionStatus=Fail or TransactionStatus=FAIL or TransactionStatus=fAil and all will return the same events.
cheers, MuS
... View more