- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
atanasmitev
Path Finder
07-27-2014
01:07 PM
Hello all,
I am trying to search for distinct count higher than a value.
Below is what I tried, obfuscated :
stats dc(var1) as some_name by var2 which returns a column of values , say {1, 55, 2200, 45, 100, .. etc}
How do I extract from that column values higher than a "limit" ?
I tried
stats dc(var1) as some_name by var2 | search some_name > limit, but it doesn't work
Ideas ?
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

lguinn2
Legend
07-27-2014
01:14 PM
If limit
is a field, you can't use search
- you need to use where
yoursearchhere
stats dc(var1) as some_name by var2
| where some_name > limit
If limit
is a literal, you can use either search
or where
yoursearchhere
stats dc(var1) as some_name by var2
| search some_name > 7
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

lguinn2
Legend
07-27-2014
01:14 PM
If limit
is a field, you can't use search
- you need to use where
yoursearchhere
stats dc(var1) as some_name by var2
| where some_name > limit
If limit
is a literal, you can use either search
or where
yoursearchhere
stats dc(var1) as some_name by var2
| search some_name > 7
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
atanasmitev
Path Finder
07-27-2014
01:21 PM
Thanks, it worked like a charm, it seems I have to RTFM more often 🙂
