<?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 Output of inner query is returned in a single line in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Output-of-inner-query-is-returned-in-a-single-line/m-p/376237#M195780</link>
    <description>&lt;P&gt;Hi Friends,&lt;/P&gt;

&lt;P&gt;Apologies for my ignorance, but I have a problem formatting the output of the result from a sub-query.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=* "[92929292]" &lt;BR /&gt;
| stats values(CALLGUID) as CALLGUID by _time&lt;/STRONG&gt;_ &lt;STRONG&gt;| dedup CALLGUID| mvexpand CALLGUID&lt;BR /&gt;
| join CALLGUID [ search index=* CALLGUID=* &lt;BR /&gt;
                                     | rex "D](:|\s-)(?&lt;SIP_CALL_ERROR&gt;[^,|.]+)" | stats count by CALLGUID error &lt;BR /&gt;
                                  | stats list(error) list(count) as count by CALLGUID]&lt;BR /&gt;
| fields _time,CALLGUID,errors,count&lt;/SIP_CALL_ERROR&gt;&lt;/STRONG&gt;_&lt;/P&gt;

&lt;P&gt;I’m working on the above query and I get the results as attached as actualoutput.png and desired_output.png&lt;/P&gt;

&lt;P&gt;Could anyone please suggest how to make it work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7297i40C3829A196FEF6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7298i94870092F408F094/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 03:31:58 GMT</pubDate>
    <dc:creator>kavyadekkata</dc:creator>
    <dc:date>2019-07-11T03:31:58Z</dc:date>
    <item>
      <title>Output of inner query is returned in a single line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Output-of-inner-query-is-returned-in-a-single-line/m-p/376237#M195780</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;

&lt;P&gt;Apologies for my ignorance, but I have a problem formatting the output of the result from a sub-query.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=* "[92929292]" &lt;BR /&gt;
| stats values(CALLGUID) as CALLGUID by _time&lt;/STRONG&gt;_ &lt;STRONG&gt;| dedup CALLGUID| mvexpand CALLGUID&lt;BR /&gt;
| join CALLGUID [ search index=* CALLGUID=* &lt;BR /&gt;
                                     | rex "D](:|\s-)(?&lt;SIP_CALL_ERROR&gt;[^,|.]+)" | stats count by CALLGUID error &lt;BR /&gt;
                                  | stats list(error) list(count) as count by CALLGUID]&lt;BR /&gt;
| fields _time,CALLGUID,errors,count&lt;/SIP_CALL_ERROR&gt;&lt;/STRONG&gt;_&lt;/P&gt;

&lt;P&gt;I’m working on the above query and I get the results as attached as actualoutput.png and desired_output.png&lt;/P&gt;

&lt;P&gt;Could anyone please suggest how to make it work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7297i40C3829A196FEF6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7298i94870092F408F094/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 03:31:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Output-of-inner-query-is-returned-in-a-single-line/m-p/376237#M195780</guid>
      <dc:creator>kavyadekkata</dc:creator>
      <dc:date>2019-07-11T03:31:58Z</dc:date>
    </item>
  </channel>
</rss>

