Splunk Search

How do you format a table row as currency but not the column field only a specific row?

EmEdwards
Path Finder

I have a table that has various columns of Totals. However, the CurrentYear can represent different information.

I only want to Format the row Category = Money as a currency value = £100000

EG

Category                          CurrentYear
Money                              100000
Cases                                    10
Visits                                     20

I'm unsure how to format a row without formatting the entire column of CurrentYear.

thanks

Tags (3)
0 Karma
1 Solution

renjith_nair
Legend

@EmEdwards,

Does this help?

|eval CurrentYear=if(Category=="Money","£".CurrentYear,CurrentYear)

You may add "£".tostring(CurrentYear,"commas") as well

Happy Splunking!

View solution in original post

0 Karma

renjith_nair
Legend

@EmEdwards,

Does this help?

|eval CurrentYear=if(Category=="Money","£".CurrentYear,CurrentYear)

You may add "£".tostring(CurrentYear,"commas") as well

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...