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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...