<?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 create a table showing the count of values across Lists/Arrays in multiple queries? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642955#M222697</link>
    <description>&lt;P&gt;If I have queries with Lists/Arrays containing events :&lt;/P&gt;&lt;P&gt;line.Data = [eventOne, eventThree];&amp;nbsp; line.Data = [eventOne, eventTwo];&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a table that shows the count of the different events:&lt;/P&gt;&lt;P&gt;eventOne: 2&lt;/P&gt;&lt;P&gt;eventTwo: 1&lt;/P&gt;&lt;P&gt;eventThree: 1&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2023 05:36:24 GMT</pubDate>
    <dc:creator>beaverjustin1</dc:creator>
    <dc:date>2023-05-11T05:36:24Z</dc:date>
    <item>
      <title>How to create a table showing the count of values across Lists/Arrays in multiple queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642955#M222697</link>
      <description>&lt;P&gt;If I have queries with Lists/Arrays containing events :&lt;/P&gt;&lt;P&gt;line.Data = [eventOne, eventThree];&amp;nbsp; line.Data = [eventOne, eventTwo];&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a table that shows the count of the different events:&lt;/P&gt;&lt;P&gt;eventOne: 2&lt;/P&gt;&lt;P&gt;eventTwo: 1&lt;/P&gt;&lt;P&gt;eventThree: 1&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 05:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642955#M222697</guid>
      <dc:creator>beaverjustin1</dc:creator>
      <dc:date>2023-05-11T05:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table showing the count of values across Lists/Arrays in multiple queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642959#M222700</link>
      <description>&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your base search&amp;gt;
| mvexpand line.Data
| stats count by line.Data&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Replace &amp;lt;your base search&amp;gt; with the search that produces the line.Data field containing the lists/arrays.&lt;/LI&gt;&lt;LI&gt;Use the mvexpand command to expand the line.Data field into separate rows, one for each event in the list.&lt;/LI&gt;&lt;LI&gt;Use the stats command with the count function to count the number of occurrences of each event.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 11 May 2023 05:58:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642959#M222700</guid>
      <dc:creator>TrangCIC81</dc:creator>
      <dc:date>2023-05-11T05:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table showing the count of values across Lists/Arrays in multiple queries?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642960#M222701</link>
      <description>&lt;P&gt;Here is a runanywhere example of how you might approach this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| eval line.Data = split("[eventOne, eventThree];[eventOne, eventTwo]",";")
| mvexpand line.Data
``` the lines above create sample events, one event per line.Data ```
| eval event=split(trim('line.Data',"[]"),", ")
| stats count by event&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 May 2023 06:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-table-showing-the-count-of-values-across-Lists/m-p/642960#M222701</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-11T06:04:16Z</dc:date>
    </item>
  </channel>
</rss>

