Quarantine Spam Reason trend
Description
This query visualises the amount of spam emails that are quarantined, summarized daily by the detection method
Query · kql
let minTime = startofday(ago(30d)); let maxTime = startofday(now()); EmailEvents | where Timestamp >= minTime | where EmailDirection == "Inbound" and DetectionMethods has "Spam" and DeliveryLocation == "Quarantine" | mv-expand Details = parse_json(DetectionMethods).Spam to typeof(string) | where isnotempty(Details) | where Timestamp < maxTime | make-series Count = count() default = 0 on Timestamp from minTime to maxTime step 1d by Details | project Count, Details, Timestamp | render timechart