Splunk Search

why is the values() function truncating or rounding my field values?

skinnygav
New Member

Hi, my price field has values 7.75372, 7.75373, 7.75375. If i pipe these results to chart values(price) by _time it charts all values as 7.754. Why is it doing this and how do i stop it from happening? I want to chart the raw values.

Tags (3)
0 Karma

ngatchasandra
Builder

Hi,
Sorry, i don't have the permissions to add comment!
I do not have any problems when i run your search. It is either your version of splunk or your search before pipe? I run this search index=values | chart values(price) by _time the results display like this in splunk 6.1.4:

time                                       values(price)
2015-01-16 14:12:07                           7.75372
                                              7.75373
                                              7.75374

MuS
SplunkTrust
SplunkTrust

It's okay not to post a comment, because this is correct. values does not truncate anything. Take this run everywhere example and see for yourself that the KBPS are mostly numbers around 0.[\d]{6} (that is a null point followed by 6 digits)

index=_internal earliest=-7d@d latest=-1d@d | timechart span=1min values(kbps) AS KBPS

cheers, MuS

0 Karma

skinnygav
New Member

it is not a multi valued field, using list(price) does not change anything. Splunk is really bad at handling raw data.

0 Karma

aweitzman
Motivator

I can't seem to duplicate this problem. Are you sure that the values are what you think they are before you get to the chart command?

If they are, then what happens if you explicitly declare the precision?

...your search... | eval actualprice=round(price,5) | chart values(actualprice) by _time

0 Karma

somesoni2
Revered Legend

The price is a multivalued field? What happens when you use "list" instead of "values"?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...