<?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 How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237636#M70611</link>
    <description>&lt;P&gt;I have data flowing in from IVR logs and have three fields I'm using which I want to build a dashboard.&lt;BR /&gt;
The event will have data either searched by a phone number or field called &lt;STRONG&gt;search&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I want to get column data showing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ColumnName ---&amp;gt;   SearchType       SearchString       Response Count
                  phoneNumber      00001234           0
                  search           0000000000         0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I club &lt;STRONG&gt;phoneNumber&lt;/STRONG&gt; and &lt;STRONG&gt;search&lt;/STRONG&gt; to assign to a field called &lt;STRONG&gt;SearchType&lt;/STRONG&gt; and its values to SearchString?&lt;/P&gt;

&lt;P&gt;Event 1 (contains logs which uses field &lt;STRONG&gt;search&lt;/STRONG&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt; SearchPost Request: {requestParam={docType=policy, sourceSystem=[hdes, pup], **search**=00001234, prodTypeCode=[au, ho, pup, pu, pa], policyStatus=[active, renewal secured, lapsed]}, header={channelType=DSU, agency=null, requestType=IVR, agent=null}}, **Response Count: 0**, Total Time Taken: 117
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 2 (contains logs which uses field &lt;STRONG&gt;phoneNumber&lt;/STRONG&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt; SearchPost Request: {requestParam={docType=policy, **phoneNumber**={value=0000000000, type=[*]}, sourceSystem=[pas, mais, cogen, hdes, pup, sis, maig_auto, maig_home], search=, prodTypeCode=[au, ho, pup, pu, pa], policyStatus=[active, renewal secured, lapsed]}, header={channelType=DSU, agency=null, requestType=IVR, agent=null}}, **Response Count: 0**, Total Time Taken: 18
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Aug 2016 20:24:12 GMT</pubDate>
    <dc:creator>athorat</dc:creator>
    <dc:date>2016-08-15T20:24:12Z</dc:date>
    <item>
      <title>How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237636#M70611</link>
      <description>&lt;P&gt;I have data flowing in from IVR logs and have three fields I'm using which I want to build a dashboard.&lt;BR /&gt;
The event will have data either searched by a phone number or field called &lt;STRONG&gt;search&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;I want to get column data showing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ColumnName ---&amp;gt;   SearchType       SearchString       Response Count
                  phoneNumber      00001234           0
                  search           0000000000         0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do I club &lt;STRONG&gt;phoneNumber&lt;/STRONG&gt; and &lt;STRONG&gt;search&lt;/STRONG&gt; to assign to a field called &lt;STRONG&gt;SearchType&lt;/STRONG&gt; and its values to SearchString?&lt;/P&gt;

&lt;P&gt;Event 1 (contains logs which uses field &lt;STRONG&gt;search&lt;/STRONG&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt; SearchPost Request: {requestParam={docType=policy, sourceSystem=[hdes, pup], **search**=00001234, prodTypeCode=[au, ho, pup, pu, pa], policyStatus=[active, renewal secured, lapsed]}, header={channelType=DSU, agency=null, requestType=IVR, agent=null}}, **Response Count: 0**, Total Time Taken: 117
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event 2 (contains logs which uses field &lt;STRONG&gt;phoneNumber&lt;/STRONG&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt; SearchPost Request: {requestParam={docType=policy, **phoneNumber**={value=0000000000, type=[*]}, sourceSystem=[pas, mais, cogen, hdes, pup, sis, maig_auto, maig_home], search=, prodTypeCode=[au, ho, pup, pu, pa], policyStatus=[active, renewal secured, lapsed]}, header={channelType=DSU, agency=null, requestType=IVR, agent=null}}, **Response Count: 0**, Total Time Taken: 18
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237636#M70611</guid>
      <dc:creator>athorat</dc:creator>
      <dc:date>2016-08-15T20:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237637#M70612</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | eval SearchType=case(isnotnull(search), "search", isnotnull(phoneNumber), "phoneNumber", 1=1, "other") | eval SearchString=coalesce(search, phoneNnumber) | stats count by SearchType SearchString
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:31:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237637#M70612</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T20:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237638#M70613</link>
      <description>&lt;P&gt;Thanks @sundareshr&lt;BR /&gt;
it seems it assigned the proper values but the searchType shows only values for "search" &lt;BR /&gt;
if I Filter data by SearchType(phoneNumber), SearchString field disappears.&lt;/P&gt;

&lt;P&gt;Thanks again for looking into this.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237638#M70613</guid>
      <dc:creator>athorat</dc:creator>
      <dc:date>2016-08-15T20:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237639#M70614</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | table "Response Count" search phoneNumber | untable  "Response Count" "Search Type" "Search String"
| table "Search Type" "Search String"  "Response Count"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237639#M70614</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-15T21:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search using my sample data to display two fields under one column and their values under another column in a dashboard?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237640#M70615</link>
      <description>&lt;P&gt;Is phoneNumber extracted as a field? What do you get when you type this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  | eval SearchType=case(isnotnull(search), "search", isnotnull(phoneNumber), "phoneNumber", 1=1, "other") | eval SearchString=coalesce(search, phoneNnumber) | table search phoneNumber SearchType SearchString
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Aug 2016 21:02:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-using-my-sample-data-to-display-two-fields/m-p/237640#M70615</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-15T21:02:02Z</dc:date>
    </item>
  </channel>
</rss>

