<?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 get a customized table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665726#M228400</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;, i tried the below query but this is showing as normal table, i am not getting in the way i showed in the image.&lt;BR /&gt;I just want to know whether&amp;nbsp;that is doable in Splunk ???&lt;BR /&gt;if yes how can i tweak my query????&lt;BR /&gt;&lt;BR /&gt;|tstats count&amp;nbsp; as Total_Messages where index=app-logs TERM(Request) TERM(received)&amp;nbsp; TERM(from) TERM(all) TERM(applications)&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;|appendcols&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as App_logs where&amp;nbsp; index=app-logs TERM(Application) TERM(logs) TERM(received)]&lt;BR /&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as Exception_logs where index=app-logs&amp;nbsp; TERM(Exception)&amp;nbsp; TERM(logs)&amp;nbsp; TERM(received)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as Canceled_logs&amp;nbsp;where &amp;nbsp;index=app-logs&amp;nbsp; TERM(unpassed)&amp;nbsp;TERM( logs)&amp;nbsp; TERM(received)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;401_mess_logs where&amp;nbsp; index=app-logs&amp;nbsp; TERM(401)&amp;nbsp;TERM( error)&amp;nbsp; TERM(message)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as url where&amp;nbsp; index=app-logs TERM(url)&amp;nbsp;TERM( info)&amp;nbsp; TERM(staged)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as cleared_log where&amp;nbsp; index=app-logs&amp;nbsp; TERM(Filtered)&amp;nbsp; TERM(logs)&amp;nbsp; TERM(arranged)]&lt;BR /&gt;|table *&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2023 23:56:13 GMT</pubDate>
    <dc:creator>Ash1</dc:creator>
    <dc:date>2023-10-20T23:56:13Z</dc:date>
    <item>
      <title>how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665710#M228395</link>
      <description>&lt;P&gt;I have a query&amp;nbsp; and i need to show the logs as shown in the below image.&lt;BR /&gt;&lt;BR /&gt;Total Messages:&amp;nbsp; index=app-logs " Request received from all applications" |stats count&lt;BR /&gt;&lt;BR /&gt;Error count: Sum of count (App logs + Exception logs +&amp;nbsp;Canceled logs +&amp;nbsp;401 mess logs)&lt;BR /&gt;App logs:&amp;nbsp; index=app-logs "Application logs received"&lt;BR /&gt;Exception logs:&amp;nbsp; index=app-logs "Exception logs received"&lt;BR /&gt;Canceled logs:&amp;nbsp; index=app-logs "unpassed logs received"&lt;BR /&gt;401 mess logs:&amp;nbsp; index=app-logs "401 error message"&lt;BR /&gt;&lt;BR /&gt;Stand by count: Subtract(url - cleared log)&lt;BR /&gt;url:&amp;nbsp;&amp;nbsp; index=app-logs "url info staged"&lt;BR /&gt;cleared log:&amp;nbsp;index=app-logs "Filtered logs arranged"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ash1_0-1697824108042.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27681iCE402048FF782BDC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ash1_0-1697824108042.png" alt="Ash1_0-1697824108042.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 17:58:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665710#M228395</guid>
      <dc:creator>Ash1</dc:creator>
      <dc:date>2023-10-20T17:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665717#M228396</link>
      <description>&lt;P&gt;And what have you tried so far and what is the problem with your result?&lt;/P&gt;&lt;P&gt;To make things clear - in Splunk there is no "merging" of cells. Maybe there is a visualization which silently renders a table this way but I know of no such thing. Generally, a table has a "full grid" of results.&lt;/P&gt;&lt;P&gt;Do you have problems with combining your searches into a single one or do you have the search but can't visualize it?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 20:18:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665717#M228396</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-20T20:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665726#M228400</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;, i tried the below query but this is showing as normal table, i am not getting in the way i showed in the image.&lt;BR /&gt;I just want to know whether&amp;nbsp;that is doable in Splunk ???&lt;BR /&gt;if yes how can i tweak my query????&lt;BR /&gt;&lt;BR /&gt;|tstats count&amp;nbsp; as Total_Messages where index=app-logs TERM(Request) TERM(received)&amp;nbsp; TERM(from) TERM(all) TERM(applications)&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;|appendcols&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as App_logs where&amp;nbsp; index=app-logs TERM(Application) TERM(logs) TERM(received)]&lt;BR /&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as Exception_logs where index=app-logs&amp;nbsp; TERM(Exception)&amp;nbsp; TERM(logs)&amp;nbsp; TERM(received)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as Canceled_logs&amp;nbsp;where &amp;nbsp;index=app-logs&amp;nbsp; TERM(unpassed)&amp;nbsp;TERM( logs)&amp;nbsp; TERM(received)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;401_mess_logs where&amp;nbsp; index=app-logs&amp;nbsp; TERM(401)&amp;nbsp;TERM( error)&amp;nbsp; TERM(message)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as url where&amp;nbsp; index=app-logs TERM(url)&amp;nbsp;TERM( info)&amp;nbsp; TERM(staged)]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;|appendcols&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[|tstats count&amp;nbsp; as cleared_log where&amp;nbsp; index=app-logs&amp;nbsp; TERM(Filtered)&amp;nbsp; TERM(logs)&amp;nbsp; TERM(arranged)]&lt;BR /&gt;|table *&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 23:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665726#M228400</guid>
      <dc:creator>Ash1</dc:creator>
      <dc:date>2023-10-20T23:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665741#M228408</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults format=csv data="group,log,count
Error,App logs,100
Error,Exception logs,100
Error,Cancelled logs,25
Error,401 mess logs,25
Stand by,url,150
Stand by,cleared log,100"
``` The previous lines set up some sample data in line with your image ```
| appendpipe
    [| stats sum(count) as total by group]
| sort 0 -group count log
| addcoltotals labelfield=group
| eval count=coalesce(count,total)
| eval summary=if(isnull(log),group." count",null())
| eval group=if(isnull(log),null(),group)
| reverse
| table summary total group log count&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 21 Oct 2023 09:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665741#M228408</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-21T09:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665746#M228410</link>
      <description>&lt;P&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;said, Splunk does not mimic modern spreadsheet's visualization.&amp;nbsp; The forte of Splunk is to turn unstructured data into relational tables. &amp;nbsp;Every grid in Splunk is fully rendered. &amp;nbsp;Text alignment is not articulated. &amp;nbsp;And cell coloring is generally unsupported.&lt;/P&gt;&lt;P&gt;With these constraints, you can design your own visual vocabulary to render the cells with various elements. &amp;nbsp;For example, your spreadsheet visualization can be simulated with&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mess-breakdowns.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27685i3F0D7396EDF7BB0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mess-breakdowns.png" alt="mess-breakdowns.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note your illustrated Standby count of 250 is the sum of url and cleared_log, not the difference as you formulated. &amp;nbsp;I suspect that this is intended. &amp;nbsp;So, I added an additional visual element under breakdowns to highlight the url - cleared_log.&lt;/P&gt;&lt;P&gt;The above is rendered with the following search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count  as App_logs where  index=app-logs TERM(Application) TERM(logs) TERM(received)
| appendcols
    [|tstats count  as Exception_logs where index=app-logs  TERM(Exception)  TERM(logs)  TERM(received)]
| appendcols
    [|tstats count  as Canceled_logs where  index=app-logs  TERM(unpassed) TERM( logs)  TERM(received)]
| appendcols
    [|tstats count  as 401_mess_logs where  index=app-logs  TERM(401) TERM( error)  TERM(message)]
| eval mess_type = "Error count", count = App_logs + Exception_logs + Canceled_logs + '401_mess_logs'
| eval breakdowns = mvappend("App_logs: " . App_logs, "Exception_logs: " . Exception_logs, "Canceled_logs: " . Canceled_logs, "401_mess_logs: " . '401_mess_logs')
| fields - *_logs
| append
    [|tstats count  as url where  index=app-logs TERM(url) TERM( info)  TERM(staged)
    |appendcols
        [|tstats count  as cleared_log where  index=app-logs  TERM(Filtered)  TERM(logs)  TERM(arranged)]
    | eval mess_type = "Standby count", count = url + cleared_log
    | eval breakdowns = mvappend("url: " . url, "cleared_log: " . cleared_log, ":standby: " . (url - cleared_log))
    | fields - url cleared_log]
| addcoltotals labelfield=mess_type label="Total mess"
| table mess_type count breakdowns&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I did not change your tstats searches. &amp;nbsp;If the TERM combinations give you the correct counts, great. &amp;nbsp;If not, you may need to use index searches. &amp;nbsp;In that scenario, append and appendcols are so inefficient you will need to use other methods to get individual counts. &amp;nbsp;But the visual tweaks remain the same.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 10:14:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/665746#M228410</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-21T10:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to get a customized table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/666187#M228539</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;, Thank you so much i got the query what i was expecting.&lt;BR /&gt;But i have some changes here can you help me on that&lt;BR /&gt;&lt;BR /&gt;Standby Column i don't have any individual searches&amp;nbsp; like url and cleared_log i just need standby count as Toatal _Messages&amp;nbsp; - Errro_count&amp;nbsp; should be displyed on the table. Rest all will be the same.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;|tstats count  as Total_Messages where index=app-logs TERM(Request) TERM(received)  TERM(from) TERM(all) TERM(applications) &lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 15:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-a-customized-table/m-p/666187#M228539</guid>
      <dc:creator>Ash1</dc:creator>
      <dc:date>2023-10-25T15:56:32Z</dc:date>
    </item>
  </channel>
</rss>

