- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PaulaCom
Path Finder
09-19-2024
03:02 AM
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
09-19-2024
04:07 AM
If your values are in a multi-value field, you can do something like this
| eval choice=mvindex(displayName, random()%200)
If the names are in separate events, you could do something like this
| eval id=random()%500
| sort 0 id
| head 5
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PaulaCom
Path Finder
09-19-2024
04:12 AM
thank you the second option works for what i need
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PaulaCom
Path Finder
09-19-2024
04:08 AM
i've looked at similar search online and have come up with this
| table "Display Name"
| eval "group" = (random() % 2) +1
| stats list("Display Name") as "Display Name" by "group"
this is returning random names in two groups
group | display Name |
1 |
joe blogs 5 joe blogs 2 joe blogs 6 |
2 |
joe blogs 7 joe blogs 8 joe blogs 12 |
Any ideas how i can set the number returning for each group? maybe using the limit function???
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
09-19-2024
04:12 AM
| eval id=random()
| sort 0 id
| streamstats count as id
| eval group=((id - 1)%5) + 1
| stats list("Display Name") as "Display Name" by group
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
09-19-2024
04:07 AM
If your values are in a multi-value field, you can do something like this
| eval choice=mvindex(displayName, random()%200)
If the names are in separate events, you could do something like this
| eval id=random()%500
| sort 0 id
| head 5
