Spam detection by delivery location
Description
This query visualises total emails with Spam detections over time summarizing the data daily by Delivery Location.
Query · kql
EmailEvents | where Timestamp > ago(30d) // last 30 days by default, replace 30d with the desired period | where DetectionMethods has "Spam" and EmailDirection == "Inbound" | make-series TotalSpamDetections=count(),Quarantine = countif(DeliveryLocation == "Quarantine"),Junkfolder=countif(DeliveryLocation == "Junk folder") ,Inbox=countif(DeliveryLocation == "Inbox/folder"),Failed=countif(DeliveryLocation == "Failed"),Dropped=countif(DeliveryLocation == "Dropped") default = 0 on Timestamp step 1d // | render timechart // Uncomment this line to render as a graph