Splunk Search

Percent timechart

Camilleri
Engager

I'm currently using this query to display a chart with two lines: the TotalItems and the number of Mismatches.

index=app sourcetype="someSource" | timechart count(method) as TotalItems, count(Mismatch) as Mismatches

I need to display the percent of mismatches (mismatches*100/totalItems) of the two lines. Any tips would be really appreciated.

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Just add an eval statement with your desired calculation, like this

index=app sourcetype="someSource" | timechart count(method) as TotalItems, count(Mismatch) as Mismatches | eval PercentMismtach=round(Mismatches*100/TotalItems,2)

View solution in original post

0 Karma

somesoni2
Revered Legend

Just add an eval statement with your desired calculation, like this

index=app sourcetype="someSource" | timechart count(method) as TotalItems, count(Mismatch) as Mismatches | eval PercentMismtach=round(Mismatches*100/TotalItems,2)
0 Karma

Camilleri
Engager

Thank you!

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

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 ...