<?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: how to format results getting from multiple append in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626171#M217642</link>
    <description>&lt;P&gt;Thanks very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;for explanation.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Jan 2023 13:19:20 GMT</pubDate>
    <dc:creator>MrIncredible</dc:creator>
    <dc:date>2023-01-06T13:19:20Z</dc:date>
    <item>
      <title>How to format results getting from multiple append?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626144#M217633</link>
      <description>&lt;P&gt;Query:&lt;/P&gt;
&lt;P&gt;index="web_app" (application= "abc-dxn-message-api" AND tracepoint= "START") (facility="d55075aaedc86d6577676605c0b5f3c0" OR "XYZ") | stats count as Input&lt;BR /&gt;|append [search (application= "hum-message-api" AND tracepoint= "END") (facility="d55075aaedc86d6577676605c0b5f3c0" OR "XYZ") | stats count as Processed]&lt;BR /&gt;|append [search (facility="d55075aaedc86d6577676605c0b5f3c0" OR "XYZ") "ERROR" | stats count as Error]&lt;BR /&gt;| transpose column_name="Bundle"&lt;/P&gt;
&lt;P&gt;Current Result: 4 columns * 3 rows&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MrIncredible_0-1673003404390.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23232iF8A56F30393596A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MrIncredible_0-1673003404390.png" alt="MrIncredible_0-1673003404390.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected Result: 2 columns * 3 rows&lt;/P&gt;
&lt;P&gt;Bundle&amp;nbsp; &amp;nbsp; Count&lt;/P&gt;
&lt;P&gt;Input&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x&lt;/P&gt;
&lt;P&gt;Error&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x&lt;/P&gt;
&lt;P&gt;Processed x&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 18:03:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626144#M217633</guid>
      <dc:creator>MrIncredible</dc:creator>
      <dc:date>2023-01-06T18:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to format results getting from multiple append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626156#M217634</link>
      <description>&lt;P&gt;OK. Let me help you understand what's going on.&lt;/P&gt;&lt;P&gt;You have three separate searches which produce diffently named field in the output.&lt;/P&gt;&lt;P&gt;Just remove the final transpose from your command and you'll see.&lt;/P&gt;&lt;P&gt;You'll get something like&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Input&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Processed&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Bundle&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;123&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;432&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is perfectly understandable.&lt;/P&gt;&lt;P&gt;Now if you transpose it you just change the rows to columns and vice versa so you're getting a half-empty table.&lt;/P&gt;&lt;P&gt;What you need is to "compact" your results before calling transpose so you have just one row which after transposition will get to be one column.&lt;/P&gt;&lt;P&gt;So the easiest way is to do&lt;/P&gt;&lt;PRE&gt;| stats values(*) as *&lt;/PRE&gt;&lt;P&gt;That way you'll get just one row in your results with all the fields set by your appended subsearches. Now you can freely transpose this row if you wish &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 11:39:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626156#M217634</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-01-06T11:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to format results getting from multiple append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626159#M217636</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884" target="_blank" rel="noopener"&gt;@PickleRick&lt;/A&gt;&amp;nbsp;its working but do you mind if I ask you to explain this part a bit "stats values(*) as *" specially (*) as *.&lt;SPAN&gt;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 12:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626159#M217636</guid>
      <dc:creator>MrIncredible</dc:creator>
      <dc:date>2023-01-06T12:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to format results getting from multiple append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626170#M217641</link>
      <description>&lt;P&gt;It's not "(*) AS *" but you need to take whole "values(*) AS *". It's a useful shorthand in splunk stats which works twofold.&lt;/P&gt;&lt;P&gt;Firstly - values(*) can be used to specify the same aggregation on all fields (or a subset of fields if you only match field names partially. This way you can avoid specifying multiple fields explicitly which makes the search easier to read and you can account for field names that you don't know the names beforehand. You just write values(*) and let splunk worry about the field names - you'll get a separate aggregation on each field that there is.&lt;/P&gt;&lt;P&gt;So that's one thing.&lt;/P&gt;&lt;P&gt;Secondly, we have wildcarded rename (the "AS" part). Without it we would get columns with names "values(Input)", "values(Processed)", and "values(Bundle)". We could live with that but it's not a pretty solution. So we apply the rename which - in case we use our stats with wildcard - can also take wildcard as argument which means that for each "source" column we will name the resulting column the same.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 13:17:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626170#M217641</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-01-06T13:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to format results getting from multiple append</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626171#M217642</link>
      <description>&lt;P&gt;Thanks very much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;for explanation.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 13:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-format-results-getting-from-multiple-append/m-p/626171#M217642</guid>
      <dc:creator>MrIncredible</dc:creator>
      <dc:date>2023-01-06T13:19:20Z</dc:date>
    </item>
  </channel>
</rss>

