<?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 Column Merging, how to? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Column-Merging-how-to/m-p/103936#M26884</link>
    <description>&lt;P&gt;The below search script successfully charts one table with two separate set of search results each has the individual &lt;SITE id=""&gt; columns. Trouble is, we need the &lt;SITE id=""&gt; column as merged into one column. Note that not each event type has a result, thus some of the events will have null entry.&lt;BR /&gt;
Does anyone can light my way? &lt;BR /&gt;
Thanks.&lt;BR /&gt;
Here is the search script I am using.&lt;/SITE&gt;&lt;/SITE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventType="event1" 
| chart count(eval(time&amp;lt;4000)) as event1LessThan4Sec, count as TotalCount1 by siteID
| rename siteID as "ID for 1"
| eval SLAsMet1=event1LessThan4Sec/TotalCount1
| appendcols [ search eventType="event2" 
    | chart count(eval(time&amp;lt;2000)) as event2LessThan2Sec, count as TotalCount2 by siteID
    | rename siteID as "ID for 2"
    | eval SLAsMet2=event2LessThan2Sec/TotalCount2
]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 18 May 2011 14:40:32 GMT</pubDate>
    <dc:creator>bilgin</dc:creator>
    <dc:date>2011-05-18T14:40:32Z</dc:date>
    <item>
      <title>Column Merging, how to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Column-Merging-how-to/m-p/103936#M26884</link>
      <description>&lt;P&gt;The below search script successfully charts one table with two separate set of search results each has the individual &lt;SITE id=""&gt; columns. Trouble is, we need the &lt;SITE id=""&gt; column as merged into one column. Note that not each event type has a result, thus some of the events will have null entry.&lt;BR /&gt;
Does anyone can light my way? &lt;BR /&gt;
Thanks.&lt;BR /&gt;
Here is the search script I am using.&lt;/SITE&gt;&lt;/SITE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventType="event1" 
| chart count(eval(time&amp;lt;4000)) as event1LessThan4Sec, count as TotalCount1 by siteID
| rename siteID as "ID for 1"
| eval SLAsMet1=event1LessThan4Sec/TotalCount1
| appendcols [ search eventType="event2" 
    | chart count(eval(time&amp;lt;2000)) as event2LessThan2Sec, count as TotalCount2 by siteID
    | rename siteID as "ID for 2"
    | eval SLAsMet2=event2LessThan2Sec/TotalCount2
]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2011 14:40:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Column-Merging-how-to/m-p/103936#M26884</guid>
      <dc:creator>bilgin</dc:creator>
      <dc:date>2011-05-18T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Column Merging, how to?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Column-Merging-how-to/m-p/103937#M26885</link>
      <description>&lt;P&gt;So you just want one field containing the value of either "ID for 1" or "ID for 2", with the assumption that only one of them will contain a value ?&lt;/P&gt;

&lt;P&gt;If so, you can always use something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval siteID=coalesce("ID for 1", "ID for 2")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2011 15:17:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Column-Merging-how-to/m-p/103937#M26885</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2011-05-18T15:17:24Z</dc:date>
    </item>
  </channel>
</rss>

