Splunk Search

Is there a way that I can output my values as a fraction instead of a decimal?

MatthewH007
Path Finder

Is there a way that I can output my values as a Fraction?

Example:

A = 1
B = 2

eval New_Value = A/B

New_Value = 1/2

I tried simply messing around with the printf command but just kept getting errors. I don't need the fraction to be lowered down to LCD (lowest common denominator) just to output A/B. My end goal is to put this in a dashboard panel. I realize I can probably get something similar to work messing with the XML, but the problem would be if someone zoomed in / out, then the alignment would be off. I would like to have just ONE "tile" with a fraction in it.

Any insight or help would be greatly appreciated.

0 Karma
1 Solution

Vijeta
Influencer

Hi @MatthewH007 Can you try concatenating it .

eval New_Value= A."/".B

View solution in original post

Vijeta
Influencer

Hi @MatthewH007 Can you try concatenating it .

eval New_Value= A."/".B

MatthewH007
Path Finder

Just what I needed. 🙂

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...