Archive

Insert % sign for each result in a specific column

Contributor

Current search results are in a table form such as the following:

Search String | Search Engine | Visits | Percent
Document123   | Google        | 25     | 9.0123
ABC123        | Yahoo         | 21     | 8.7501
HelloWorld    | Bing          | 2      | 1.0201

I'm attempting to have it displayed as the following:

Search String | Search Engine | Visits | Percent
Document123   | Google        | 25     | 9.0123%
ABC123        | Yahoo         | 21     | 8.7501%
HelloWorld    | Bing          | 2      | 1.0201%

Thanks in advance!
Joe

Tags (3)
1 Solution

Builder

Hi Joe,

You can simply do that:

| eval Percent = Percent + " %"

Hope this helps!!

View solution in original post

Legend

At the end of your search, add

| fieldformat Percent=tostring(Percent) + "%"

That should do it!

Explorer

Is it possible to also round to two decimal places in addition to adding the % at the end of the search?

0 Karma

Explorer

It's ok, I figured it out with the round(x,y) command.

0 Karma

Builder

Hi Joe,

You can simply do that:

| eval Percent = Percent + " %"

Hope this helps!!

View solution in original post

Contributor

Perfect!!!

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes and swag!