<?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: Count of distinct events by multiple values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178051#M51196</link>
    <description>&lt;P&gt;I need to explain better.  If i want to list the count of each http status code by location, the commas are just to delineate columns.  each column is a location and the intersection of the error code row and the location column is the count of those error for that location.&lt;/P&gt;

&lt;P&gt;error code,location1,location2,location3,location4,location{n}&lt;BR /&gt;
400,23,45,67,89,&lt;BR /&gt;
403,etc...&lt;BR /&gt;
404&lt;BR /&gt;
500&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2015 20:14:41 GMT</pubDate>
    <dc:creator>Cuyose</dc:creator>
    <dc:date>2015-04-30T20:14:41Z</dc:date>
    <item>
      <title>Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178047#M51192</link>
      <description>&lt;P&gt;This seems easy but for some reason I guess I don't know how to ask the question.&lt;/P&gt;

&lt;P&gt;I want a table that looks like this:  Where the reason rows are error messages, and the column is another value "location" and I want to get the count of.&lt;BR /&gt;
reason1, countofA, countofB, countofC, etc.&lt;BR /&gt;
reason2, countofA, countofB, countofC, etc.&lt;/P&gt;

&lt;P&gt;My current stats count by reason, location pipes out a table like below, which I do not want.&lt;BR /&gt;
reason1,A,countofA&lt;BR /&gt;
reason1,B,countofB&lt;BR /&gt;
reason2,A,countofA&lt;BR /&gt;
etc&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 19:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178047#M51192</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2015-04-30T19:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178048#M51193</link>
      <description>&lt;P&gt;You might be able to get by with using &lt;CODE&gt;mvexpand&lt;/CODE&gt; and &lt;CODE&gt;chart&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Here's a quick example using dummy values-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |stats count|eval test="A,B,A"|eval reason="reason1"|makemv test delim=","|mvexpand test|chart count(test) by reason test
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Apr 2015 19:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178048#M51193</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2015-04-30T19:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178049#M51194</link>
      <description>&lt;P&gt;try like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| stats count(*) as countof* by reason | 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Apr 2015 19:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178049#M51194</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-04-30T19:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178050#M51195</link>
      <description>&lt;P&gt;Unfortunately this will just give the full count of the MVfield and not the values IN the MVfield.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 20:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178050#M51195</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2015-04-30T20:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178051#M51196</link>
      <description>&lt;P&gt;I need to explain better.  If i want to list the count of each http status code by location, the commas are just to delineate columns.  each column is a location and the intersection of the error code row and the location column is the count of those error for that location.&lt;/P&gt;

&lt;P&gt;error code,location1,location2,location3,location4,location{n}&lt;BR /&gt;
400,23,45,67,89,&lt;BR /&gt;
403,etc...&lt;BR /&gt;
404&lt;BR /&gt;
500&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 20:14:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178051#M51196</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2015-04-30T20:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178052#M51197</link>
      <description>&lt;P&gt;I got it, xyseries&lt;BR /&gt;
| stats count(error) AS numOf by location error&lt;BR /&gt;
|xyseries error,location,numOf&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 20:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178052#M51197</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2015-04-30T20:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178053#M51198</link>
      <description>&lt;P&gt;Excellent! I see your data was not as I thought. I've upvoted your self answer!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 20:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178053#M51198</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2015-04-30T20:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count of distinct events by multiple values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178054#M51199</link>
      <description>&lt;P&gt;Thanks!  I knew I had used that before, just got lost in the shuffle, had a brain fart!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2015 20:30:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-of-distinct-events-by-multiple-values/m-p/178054#M51199</guid>
      <dc:creator>Cuyose</dc:creator>
      <dc:date>2015-04-30T20:30:37Z</dc:date>
    </item>
  </channel>
</rss>

