<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Table from two separate searches and sourcetypes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569452#M198472</link>
    <description>&lt;P&gt;Perhaps this will help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = indexa (sourcetype = sourcetypeA  OR sourcetype = sourcetypeB)
| stats sum(eval(sourcetype=sourcetypA) as "Result A", sum(eval(sourcetype=sourcetypeB) as "Result B"
| other logic etc
| table month_year "Result A" "Result B"&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 02 Oct 2021 17:18:19 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-10-02T17:18:19Z</dc:date>
    <item>
      <title>Table from two separate searches and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569451#M198471</link>
      <description>&lt;P&gt;So, to preface this, I am very new to Splunk.&amp;nbsp;&lt;BR /&gt;The end game is to make a chart overlay, but that's not my main question here.&lt;BR /&gt;&lt;BR /&gt;I have two searches with very similar information being returned. I need to make a table with information from both searches and I just can't seem to manage it. I have tried append, appendcols, multisearch, etc. The problem is that I cannot use OR for the sourcetype because the two sourcetypes have extremely similar information in them and the queries to pull from them are the exact same.&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;First:&lt;BR /&gt;&lt;BR /&gt;index = indexa sourcetype = sourcetypeA&amp;nbsp;&lt;BR /&gt;| count X as "Result A"&lt;BR /&gt;| other logic etc&lt;BR /&gt;| table month_year "Result A"&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Second:&lt;BR /&gt;&lt;BR /&gt;index= indexa sourcetype = sourcetypeB&lt;BR /&gt;| count X as "Result B"&lt;BR /&gt;| other logic etc&lt;BR /&gt;| table month_year "Result B"&lt;BR /&gt;&lt;BR /&gt;Ultimately I'd want the results to say:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;month_Year&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Result B&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;Result A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;info&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;info&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;info&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Right now when I attempt to do anything, it just skips out on "Result B" entirely. I know there must be some simple way I'm just missing. If anyone could help me out I'd really appreciate it, this is driving me crazy.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 17:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569451#M198471</guid>
      <dc:creator>Brainstorms</dc:creator>
      <dc:date>2021-10-02T17:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Table from two separate searches and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569452#M198472</link>
      <description>&lt;P&gt;Perhaps this will help.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = indexa (sourcetype = sourcetypeA  OR sourcetype = sourcetypeB)
| stats sum(eval(sourcetype=sourcetypA) as "Result A", sum(eval(sourcetype=sourcetypeB) as "Result B"
| other logic etc
| table month_year "Result A" "Result B"&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 02 Oct 2021 17:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569452#M198472</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-02T17:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table from two separate searches and sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569453#M198473</link>
      <description>&lt;P&gt;THANK YOU. I knew I was close in some of my attempts but I just couldn't make the connection. This worked for me exactly as needed.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 17:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-from-two-separate-searches-and-sourcetypes/m-p/569453#M198473</guid>
      <dc:creator>Brainstorms</dc:creator>
      <dc:date>2021-10-02T17:59:49Z</dc:date>
    </item>
  </channel>
</rss>

