Splunk Search

eval calculations

Dsrao12345
New Member

how to solve the above issue using eval function.

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

Tags (2)
0 Karma

woodcock
Esteemed Legend

Like this?

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

richgalloway
SplunkTrust
SplunkTrust

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

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...