Splunk Search

eval calculations

New Member

how to solve the above issue using eval function.

(1 * 100) / (1 + 2) = % .

Tags (2)
0 Karma

Esteemed Legend

Like this?

| makeresults | eval answer = round(((1 * 100) / (1 + 2)), 2) . "%"
0 Karma

SplunkTrust
SplunkTrust

Um, | eval pct=(1 * 100) / (1 + 2)

---
If this reply helps you, an upvote would be appreciated.
0 Karma