Splunk Search

How to append a single value to multiple rows in my table?

ashishlal82
Explorer
base search| mvexpand Name | stats dc(Name) as totalcve by severity | appendcols [|inputlookup lookupname| stats count(Name) as TotalCVE] |eval perc=tostring(totalcve/TotalCVE*100, "commas")."%

I have a search that outputs below table

Severity    totalCVE    TotalCVE    perc
High        2000        10000       20%
Medium      1000
Low         500

How can I append a single value (TotalCVE) to multiple rows and get perc for medium and low severities?

0 Karma

somesoni2
Revered Legend

Give this a try

 base search| mvexpand Name | stats dc(Name) as totalcve by severity | eval TotalCVE=[|inputlookup lookupname| stats count(Name) as search ] |eval perc=tostring(totalcve/TotalCVE*100, "commas")."%

richgalloway
SplunkTrust
SplunkTrust

Try ... | filldown TotalCVE | eval perc=....

---
If this reply helps you, Karma would be appreciated.
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 ...