Dashboards & Visualizations

Dynamic rangemap values

tachu
Explorer

I have a query that gets the running revenue number and i want to create a rangemap that shows green if its within 20 percent of yesterdays number what i have so far is

query |table Today,Yesterday |eval top_range=Yesterday * 1.2 |eval low_range=Yesterday * .8 |table Today,low_range,top_range and it displays the values i want what i wanted to do was to then provide instead of table go |rangemap field=Today green=low_range-top_range is there any way to pass calculated values to rangemap

Thanks

T

Tags (1)
0 Karma

ziegfried
Influencer

No, rangemap only accepts literal numbers, not fields for the domain values. You can use the eval command, though:

<your query> | eval range=if( Today < Yesterday*1.2 AND Today > Yesterday*0.8 ,"low", "severe")
0 Karma

ziegfried
Influencer

hehe, np 😉

0 Karma

kristian_kolb
Ultra Champion

Soorryy, I was rather tired when I wrote that...

0 Karma

ziegfried
Influencer

Nope. If today's value is within 80-120% of yesterday's value, then output range=low (ie. green).

0 Karma

kristian_kolb
Ultra Champion

Shouldn't that be OR in the if statement?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...