<?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: Max of Distinct Count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122584#M33040</link>
    <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x heartbeat AssetType=Linear |bucket span=1m _time | eval DistinctSession=XDI.AssetID | timechart span=1m dc(DistinctSession) as ConcurrentSession by DeviceType | timechart span=1d max(*) by *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Jul 2014 15:48:32 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-07-01T15:48:32Z</dc:date>
    <item>
      <title>Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122578#M33034</link>
      <description>&lt;P&gt;I am trying to get a distinct count of two concatenated numbers and then get the max of that distinct count over a time period. My current search works up until the last pipe. I can get the distinct count but not the max of the distinct count. Any help is appreciated!&lt;/P&gt;

&lt;P&gt;index=x heartbeat AssetType=Linear &lt;BR /&gt;
|bucket span=1m _time | eval DistinctSession=XDI.AssetID &lt;BR /&gt;
| timechart span=1m dc(DistinctSession) as ConcurrentSession by DeviceType &lt;BR /&gt;
| timechart span=1d max(ConcurrentSession) by DeviceType&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 14:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122578#M33034</guid>
      <dc:creator>pontorito</dc:creator>
      <dc:date>2014-06-27T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122579#M33035</link>
      <description>&lt;P&gt;I'd guess the first &lt;CODE&gt;timechart&lt;/CODE&gt; assigns one column for each value of &lt;CODE&gt;DeviceType&lt;/CODE&gt;, so the second &lt;CODE&gt;timechart&lt;/CODE&gt; doesn't find any column named &lt;CODE&gt;DeviceType&lt;/CODE&gt;. Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x heartbeat AssetType=Linear | rename XDI.AssetID as  DistinctSession
| bucket span=1m _time | stats dc(DistinctSession) as ConcurrentSession by _time DeviceType
| timechart span=1d max(ConcurrentSession) by DeviceType
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122579#M33035</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-27T15:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122580#M33036</link>
      <description>&lt;P&gt;this is close...the DeviceType field is now showing up but I still can't get a max number. For some reason the dc isn't being pulled into the timechart function to compute a max&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122580#M33036</guid>
      <dc:creator>pontorito</dc:creator>
      <dc:date>2014-06-27T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122581#M33037</link>
      <description>&lt;P&gt;Do the values look right when you leave off the &lt;CODE&gt;timechart&lt;/CODE&gt;?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x heartbeat AssetType=Linear | rename XDI.AssetID as  DistinctSession
| bucket span=1m _time | stats dc(DistinctSession) as ConcurrentSession by _time DeviceType
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jun 2014 15:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122581#M33037</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-27T15:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122582#M33038</link>
      <description>&lt;P&gt;Can you describe what you want the timechart to look like? I'd guess there will be two series:  one showing the distinct count, hourly and another showing the max at the daily granularity? &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jun 2014 16:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122582#M33038</guid>
      <dc:creator>Ledion_Bitincka</dc:creator>
      <dc:date>2014-06-27T16:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122583#M33039</link>
      <description>&lt;P&gt;I'm trying to distinct count per minute, and then I want the max of those distinct counts per day. Basically I want one number per day - the max value of those per minute counts. A little confusing, I know. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122583#M33039</guid>
      <dc:creator>pontorito</dc:creator>
      <dc:date>2014-07-01T15:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Max of Distinct Count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122584#M33040</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=x heartbeat AssetType=Linear |bucket span=1m _time | eval DistinctSession=XDI.AssetID | timechart span=1m dc(DistinctSession) as ConcurrentSession by DeviceType | timechart span=1d max(*) by *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Jul 2014 15:48:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Max-of-Distinct-Count/m-p/122584#M33040</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-01T15:48:32Z</dc:date>
    </item>
  </channel>
</rss>

