Splunk Search

Can I add two table values in a single table

rkishoreqa
Communicator

Hi team,

 

How can I add the below two queries into one single query and present in a single table.

query 1 : index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals
Result :   app1 5
                  app2 8

query 2 : index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals
Result :  app1  3
                 app2  6

 

Now I need a single query to add above both values and display in Dashboard like below (adding above both table data):
app1   8
app2  14

Labels (1)
0 Karma
1 Solution

rkishoreqa
Communicator

Hi rich,

Thanks for the quick response

For this single query I am getting results as same as below query results. 
- index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals

and missing the results of the query -  index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Can you share some sample events of both types. please?

---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this helps.

index="dev_envi" 
| eval ApplicationName = coalesce(event.ApplicationName, ApplicationName),  Status = coalesce(event.Status, Status)
| chart count(ApplicationName) as count over ApplicationName by Status 
| addtotals
---
If this reply helps you, Karma would be appreciated.

rkishoreqa
Communicator

Hi rich,

Thanks for the quick response

For this single query I am getting results as same as below query results. 
- index="dev_envi" | chart count(ApplicationName) over ApplicationName by Status |addtotals

and missing the results of the query -  index="dev_envi" | chart count(event.ApplicationName) over event.ApplicationName by event.Status |addtotals

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...