Forum Discussion
Matthew Maguire
Jan 18, 2018Copper Contributor
Filtering log by date
Hi, I can't seem to find the right syntax for this query:
ProtectionStatus
| summarize ThreatStatusRank = max(ThreatStatusRank) by Computer, Time = bin(todatetime(DateCollected), 10m)
| summa...
- Jan 18, 2018Hi, managed to get this working using the following:
ProtectionStatus | where TimeGenerated > ago(1d) | summarize ThreatStatusRank = max(ThreatStatusRank) by Computer, Time = bin(todatetime(DateCollected), 10m) | summarize(Time, ThreatStatusRank) = argmax(Time, ThreatStatusRank) by Computer | where ThreatStatusRank !in (150, 470) | project Computer, Rank = ThreatStatusRank
Matthew Maguire
Jan 18, 2018Copper Contributor
Hi, managed to get this working using the following:
ProtectionStatus | where TimeGenerated > ago(1d) | summarize ThreatStatusRank = max(ThreatStatusRank) by Computer, Time = bin(todatetime(DateCollected), 10m) | summarize(Time, ThreatStatusRank) = argmax(Time, ThreatStatusRank) by Computer | where ThreatStatusRank !in (150, 470) | project Computer, Rank = ThreatStatusRank
- Meir_MendelovichJan 19, 2018
Microsoft
Yep, the time filter always have to come before summarize and it is recommended to come as the first condition.
Meir