<?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: Creating a table with multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656588#M226780</link>
    <description>&lt;P&gt;I am assuming that you want to get 200, 400 and 500 (not a second 400) response codes.&lt;/P&gt;&lt;P&gt;You can combine the response code and method and then chart by that field, e.g. see this run anywhere example but it is the last two lines you want.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=40
| eval responseCode=mvindex(split("200,400,500", ","), random() % 3)
| eval method=mvindex(split("GET,POST,PATCH", ","), random() % 3)
| eval app="APP".(random() % 5)
``` Use these two lines to get the chart you want ```
| eval s=responseCode."_".method
| chart count over app by s&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It will not give you a multiline header as in your image, but that's not really how Splunk does things in tables.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2023 23:07:22 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-09-04T23:07:22Z</dc:date>
    <item>
      <title>How to create a table with multiple fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656575#M226773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to create a table in the below format and provide the count for them.&lt;BR /&gt;I have multiple fields in my index and I want to create a table(similar to a excel pivot) using three fields&lt;/P&gt;
&lt;P&gt;App Name, Response code and Method&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index=abcd&amp;nbsp;&lt;BR /&gt;| chart count&amp;nbsp; over&amp;nbsp;App Name by&amp;nbsp;Response code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--&amp;gt; Above works for me but I can create a table only using 2 fields.&amp;nbsp;&lt;BR /&gt;How to create a table something as below format&amp;nbsp; with 3 fields or more than 3.&lt;/P&gt;
&lt;P&gt;Please could you help.&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="0" width="870" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="87" height="55"&gt;APP NAME&lt;/TD&gt;
&lt;TD width="261"&gt;RESPONSECODE&lt;/TD&gt;
&lt;TD width="261"&gt;RESPONSECODE&lt;/TD&gt;
&lt;TD width="261"&gt;RESPONSECODE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="19"&gt;200&lt;/TD&gt;
&lt;TD&gt;400&lt;/TD&gt;
&lt;TD&gt;400&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="19"&gt;GET&lt;/TD&gt;
&lt;TD&gt;POST&lt;/TD&gt;
&lt;TD&gt;PATCH&lt;/TD&gt;
&lt;TD&gt;GET&lt;/TD&gt;
&lt;TD&gt;POST&lt;/TD&gt;
&lt;TD&gt;PATCH&lt;/TD&gt;
&lt;TD&gt;GET&lt;/TD&gt;
&lt;TD&gt;POST&lt;/TD&gt;
&lt;TD&gt;PATCH&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="17"&gt;APP1&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="17"&gt;APP2&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lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="19"&gt;APP6&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 05 Sep 2023 19:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656575#M226773</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-09-05T19:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656576#M226774</link>
      <description>&lt;P&gt;The table pasted has been reformated. I have attached the image of the format that I need.&lt;BR /&gt;Please check the attached image&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 18:13:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656576#M226774</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-09-04T18:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656588#M226780</link>
      <description>&lt;P&gt;I am assuming that you want to get 200, 400 and 500 (not a second 400) response codes.&lt;/P&gt;&lt;P&gt;You can combine the response code and method and then chart by that field, e.g. see this run anywhere example but it is the last two lines you want.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=40
| eval responseCode=mvindex(split("200,400,500", ","), random() % 3)
| eval method=mvindex(split("GET,POST,PATCH", ","), random() % 3)
| eval app="APP".(random() % 5)
``` Use these two lines to get the chart you want ```
| eval s=responseCode."_".method
| chart count over app by s&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It will not give you a multiline header as in your image, but that's not really how Splunk does things in tables.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 23:07:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/656588#M226780</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-09-04T23:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/657046#M226948</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;Many thanks for the update. This is helpful.&amp;nbsp;&lt;BR /&gt;I will consider this as a solution&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 10:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-with-multiple-fields/m-p/657046#M226948</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-09-08T10:17:35Z</dc:date>
    </item>
  </channel>
</rss>

