I'm working with Log Insights, specifically using count_distinct(), and I'm aiming to ensure that when no records are found, the result is explicitly returned as 0.
Any insights on achieving this?"
This is my query
fields @message
| filter method= "Login" AND (ispresent(accountLocked))
| stats count_distinct (userID)