Splunk Search

show in a graph a numbers with two numbers after comma

tissparkle
Explorer

hi, I would like to build a graph with these values:

a 100
b 97,56
c 99,34

my issue is when i try to see a graph.. there is only one value show it in a graph the "A" and "100". The other values are not in a graph.
Why?

thx u soo much

0 Karma
1 Solution

Ayn
Legend

Most likely because Splunk doesn't consider the fields to be numerical. By default Splunk will consider "." to be a decimal sign but not ",". Short fix would be to replace "," with "." in your numbers.

View solution in original post

ddrillic
Ultra Champion

This should do it -

your base search
| eval basavalue="97,56"
| rex field=basavalue mode=sed "s/,/./g"
0 Karma

Ayn
Legend

Most likely because Splunk doesn't consider the fields to be numerical. By default Splunk will consider "." to be a decimal sign but not ",". Short fix would be to replace "," with "." in your numbers.

marcoscala
Builder

no way to converto those "string" into values?!?

0 Karma

rapmancz
Explorer

I have same issue. Is there any easy fix?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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