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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...