Getting Data In

How to create new column with percentage?

SS1
Path Finder

Hi,

My search is giving below output,

Month  FieldA    FieldB
Jan         285      1410
Feb         247      1934
Mar         215      2197

Can we create a new column with FieldA% and FieldB%, below is the example

Month  FieldA    FieldB   FieldA% FieldB%
Jan         285      1410        20%           80%      
Feb         247      1934         22%          78%
Mar         215      2197         15%           85%

Eventually i will only be using Month and FieldA% in a column chart

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use eval to compute the percentage

| eval FieldApct = (FieldA*100)/(FieldA + FieldB)
| rename FieldApct as "FieldA%"

 

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

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...