Dashboards & Visualizations

Take the absolute value and show the original number

flora123
Path Finder

I want to use [rangemap] to display these numbers. But not all of these numbers are positive integer. So I have to take the absolute value. The question is how could I show the original number in rangemap?

example:

...|eval abs(num1) as use_num1 |rangemap field=use_num1 low=0-500 elevated=501-800 severe=801-10000000000

<module name="SingleValue">
    <param name="field">use_num1</param>
    <param name="classField">range</param>
  </module>

How could I show the original number in the SingleValue?

My English is poor.I hope you can understand what i mean. =) Thanks a lot.

Tags (1)
0 Karma
1 Solution

ziegfried
Influencer

The eval expession should look like:

..|eval use_num1=abs(num1) | ...

and to show the original number, you just have to use in the field option of the SingleValue module:

  <module name="SingleValue">
    <param name="field">num1</param>
    <param name="classField">range</param>
  </module>

View solution in original post

ziegfried
Influencer

The eval expession should look like:

..|eval use_num1=abs(num1) | ...

and to show the original number, you just have to use in the field option of the SingleValue module:

  <module name="SingleValue">
    <param name="field">num1</param>
    <param name="classField">range</param>
  </module>

flora123
Path Finder

Great!Thank you very much!So it's that simple. 😃

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...