<?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 list only distinct values from the listed results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294352#M162001</link>
    <description>&lt;P&gt;Instead of &lt;CODE&gt;list&lt;/CODE&gt; try &lt;CODE&gt;values&lt;/CODE&gt;? i.e. &lt;CODE&gt;values(clientip1) as client_IP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 17:42:52 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-03-27T17:42:52Z</dc:date>
    <item>
      <title>How to list only distinct values from the listed results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294351#M162000</link>
      <description>&lt;P&gt;Hi I have a query which runs and results me the list of Ip's in a table format grouped by username.&lt;/P&gt;
&lt;P&gt;In my table of results there might be different IP's for the same username which are listed down in the single IP cell. Please find below the example of my result table:&lt;/P&gt;
&lt;P&gt;Username-------------------------------------------Ipaddress------------------------application---------------------------city-----------------------------country&lt;BR /&gt;1) abcd--------------------------------------------------123.123.123.12---------------------xyz---------------------------------asdf-----------------------------zxcvb&lt;BR /&gt;123.123.123.12 xyz asdf zxcvb&lt;BR /&gt;234.456.677.22 ghj ghjk fghjk&lt;/P&gt;
&lt;P&gt;2) dfgh--------------------------------------------------234.123.12.345----------------------ssss------------------------------dfggh----------------------------ghjhjkk&lt;/P&gt;
&lt;P&gt;As shown above for one username there will be list of ip's and corresponding city and country info are displayed. What i want to achieve here is that I need to display only distinct ip's for each username. How can I do it?&lt;/P&gt;
&lt;P&gt;To display my results in above table I am using the following search:&lt;/P&gt;
&lt;P&gt;mysearch &lt;BR /&gt;| iplocation clientip1&lt;BR /&gt;| streamstats count as occuranceCount list(clientip1) as client_IP, list(applicationid) as application list(Country) as Country, list(City) as City by subject&lt;BR /&gt;| sort - occuranceCount &lt;BR /&gt;| dedup subject&lt;BR /&gt;| table subject occuranceCount client_IP connectionid City Country&lt;/P&gt;
&lt;P&gt;Please help!&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 15:26:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294351#M162000</guid>
      <dc:creator>rakeshyv0807</dc:creator>
      <dc:date>2022-07-21T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294352#M162001</link>
      <description>&lt;P&gt;Instead of &lt;CODE&gt;list&lt;/CODE&gt; try &lt;CODE&gt;values&lt;/CODE&gt;? i.e. &lt;CODE&gt;values(clientip1) as client_IP&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 17:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294352#M162001</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-27T17:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294353#M162002</link>
      <description>&lt;P&gt;I have tried the values(clientip1) as client_IP but since I am deleting duplicates by username using dedup so the different Ip's of same username are not being displayed.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 17:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294353#M162002</guid>
      <dc:creator>rakeshyv0807</dc:creator>
      <dc:date>2018-03-27T17:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294354#M162003</link>
      <description>&lt;P&gt;well you are doing by subject which is already distinct so dedup subject will not make any sense. &lt;/P&gt;

&lt;P&gt;can you try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mysearch 
| iplocation clientip1 
| streamstats count as occuranceCount by subject clientip1 applicationid Country City 
| table subject occuranceCount clientip1 connectionid City Country 
| sort - occuranceCount 
| dedup subject
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Mar 2018 18:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/294354#M162003</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-27T18:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/530583#M162004</link>
      <description>&lt;P&gt;I want list out all values of variable ban in the string "ban":12897&lt;/P&gt;&lt;P&gt;Using below command but nothing is listed.&lt;/P&gt;&lt;P&gt;index=k8_bm* "jeopardyType" "Prepaid-Service-Error" "ban" | stats values(ban)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 11:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/530583#M162004</guid>
      <dc:creator>rameshnaik</dc:creator>
      <dc:date>2020-11-24T11:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/530590#M162005</link>
      <description>&lt;P&gt;you can apply any stats functions like values/list/avg/median etc to only field names. based on your query ban must be field in your index.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 12:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/530590#M162005</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-11-24T12:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only distinct values from the listed results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/606304#M210866</link>
      <description>&lt;P&gt;values is what I was searching for. It only shows distinct lists.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 08:13:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-only-distinct-values-from-the-listed-results/m-p/606304#M210866</guid>
      <dc:creator>JanniktheOne</dc:creator>
      <dc:date>2022-07-20T08:13:30Z</dc:date>
    </item>
  </channel>
</rss>

