Splunk Search

Add a data size notation to the end of a value?

I-Man
Communicator

So the following will add a $ symbol to the beginning of the value Revenue, like "$ 42"

... | eval Revenue="$ ".tostring(Revenue,"commas")

How do you add data size notations like MB or GB to the end of a value like "42 MB"

Thanks in advance for any help

I-Man

Tags (1)
0 Karma
1 Solution

yannK
Splunk Employee
Splunk Employee

same method, concatenate the values.

| eval myvaluewithnotation=myvalue."MB"

View solution in original post

erritesh17
Path Finder

But this thing is not working in visualization , for visualization adding "Value"."MB" how we can do ?

0 Karma

yannK
Splunk Employee
Splunk Employee

same method, concatenate the values.

| eval myvaluewithnotation=myvalue."MB"

yannK
Splunk Employee
Splunk Employee

the "period" is for concatenation. You can concatenate strings and field.
"A"."B"."C" => "ABC"

I-Man
Communicator

Ahh thanks. Out of curiosity, do you know what the period does prior to the "MB"?

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, ...