Dashboards & Visualizations

pie chart with 2 search results

knarayana
New Member

Hi

Search
index=index1 word1 AND word2 | stats count as card | appendcols [search index=index1 word1 AND NOT word2 | stats count as mail ]

Result
card mail
123 99

Expected Result
card 123
mail 99

so, i can see the results in a PIE chart

Thanks
nkk

Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

index1 word1 OR word2 | stats count(eval(searchmatch("word1 AND word2")) AS card count(eval(searchmatch("word1 AND NOT word2")) AS mail | transpose

View solution in original post

0 Karma

woodcock
Esteemed Legend

Like this:

index1 word1 OR word2 | stats count(eval(searchmatch("word1 AND word2")) AS card count(eval(searchmatch("word1 AND NOT word2")) AS mail | transpose
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 ...