<?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: Combining different sourcetypes with no common field ( except _time) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Combining-different-sourcetypes-with-no-common-field-except-time/m-p/558455#M92392</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227098"&gt;@ISP8055&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (sourcetype="sourcetypeA" OR sourcetype="sourcetypeB")
| eval Cluster=if(isnotnull(Cluster1),Cluster1,Cluster2)
| eval Usage=if(isnotnull(UsageA),UsageA,UsageB)
| fields Cluster Usage
| sort - Usage | head 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="Cluster1	UsageA
A	10
B	15" | multikv forceheader=1 | append [
| makeresults | eval _raw="Cluster2	UsageB
C	5
D	20" | multikv forceheader=1 ]
| eval Cluster=if(isnotnull(Cluster1),Cluster1,Cluster2)
| eval Usage=if(isnotnull(UsageA),UsageA,UsageB)
| fields Cluster Usage
| sort - Usage | head 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 16:51:46 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-07-06T16:51:46Z</dc:date>
    <item>
      <title>Combining different sourcetypes with no common field ( except _time)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-different-sourcetypes-with-no-common-field-except-time/m-p/558450#M92390</link>
      <description>&lt;P&gt;Hi, I have one sourcetypeA which has following fields&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="44.44409473172445%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Cluster1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;UsageA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;A&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;B&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;P&gt;then I have one sourcetypeB which has fields:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Cluster 2&lt;/TD&gt;&lt;TD width="50%"&gt;Usage B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;C&lt;/TD&gt;&lt;TD width="50%"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;I want to make a Splunk syntax so that I combine both sourcetypes to see top 3 usage in total among all clusters.&lt;BR /&gt;so like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Cluster&lt;/TD&gt;&lt;TD width="50%"&gt;Usage&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;D&lt;/TD&gt;&lt;TD width="50%"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;B&lt;/TD&gt;&lt;TD width="50%"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;A&lt;/TD&gt;&lt;TD width="50%"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;So, neither Cluster 2, cluster 1 nor usage A&amp;nbsp; and Usage B are common fields.&lt;BR /&gt;Is this possible to do?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 16:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-different-sourcetypes-with-no-common-field-except-time/m-p/558450#M92390</guid>
      <dc:creator>ISP8055</dc:creator>
      <dc:date>2021-07-06T16:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Combining different sourcetypes with no common field ( except _time)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-different-sourcetypes-with-no-common-field-except-time/m-p/558455#M92392</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227098"&gt;@ISP8055&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (sourcetype="sourcetypeA" OR sourcetype="sourcetypeB")
| eval Cluster=if(isnotnull(Cluster1),Cluster1,Cluster2)
| eval Usage=if(isnotnull(UsageA),UsageA,UsageB)
| fields Cluster Usage
| sort - Usage | head 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Sample Search :&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults | eval _raw="Cluster1	UsageA
A	10
B	15" | multikv forceheader=1 | append [
| makeresults | eval _raw="Cluster2	UsageB
C	5
D	20" | multikv forceheader=1 ]
| eval Cluster=if(isnotnull(Cluster1),Cluster1,Cluster2)
| eval Usage=if(isnotnull(UsageA),UsageA,UsageB)
| fields Cluster Usage
| sort - Usage | head 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 16:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-different-sourcetypes-with-no-common-field-except-time/m-p/558455#M92392</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-06T16:51:46Z</dc:date>
    </item>
  </channel>
</rss>

