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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...