<?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: dedup problem in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491012#M137099</link>
    <description>&lt;P&gt;No answer ? :'( &lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 07:56:24 GMT</pubDate>
    <dc:creator>numeroinconnu12</dc:creator>
    <dc:date>2020-03-12T07:56:24Z</dc:date>
    <item>
      <title>dedup problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491011#M137098</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;This is my query with " dedup Matricule"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=juniper_vpn  (ID=AUT22673 OR ID=AUT24803) ......67
| eval src_user=upper(src_user)
| join type=left user [| _accounts.csv |search domaine="intra"| eval user=matricule ]
| join type=left ua [|_dirigeant.csv | eval ua=UA ]
| rename user as Matricule, cn as Nom, ua as UA
| dedup Matricule
| stats min(_time) as Firstdate max(_time) as Lastdate list(Nom) as Nom list(UA) as UA list(Matricule) as Matricule by src_user
| convert timeformat="%d/%m/%Y %H:%M:%S" ctime(Firstdate) AS Firstdate, ctime(Lastdate) AS Lastdate 
| eval Date=if(Firstdate = Lastdate,"le ".Firstdate,"connecté entre le ".Firstdate." et le ".Lastdate) 
| stats count(Matricule) as "Total" list(Nom) as Nom list(Date) as "Date et heure de connexion" list(src_user) as Utilisateur by UA
| table UA Nom Utilisateur "Date et heure de connexion" "Total"
| addcoltotals labelfield=UA label="nombre total d'utilisateurs" "Total"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can see the results in the screenshot below.  &lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8525i45243BAC178A8F2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The results in the column "Date et heure de connexion" are not correct.  &lt;/P&gt;

&lt;P&gt;But if I delete "dedup Matricule" from my query, the results obtained in the column "Date et heure de connexion" are correct but they are many as you can see on the second screenshot. &lt;BR /&gt;
How can I get only one value in the "Date et heure de connexion" column without dedup? Can you please help me? &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8526i86C4FC56DE9B6CAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 22:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491011#M137098</guid>
      <dc:creator>numeroinconnu12</dc:creator>
      <dc:date>2020-03-11T22:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: dedup problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491012#M137099</link>
      <description>&lt;P&gt;No answer ? :'( &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 07:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491012#M137099</guid>
      <dc:creator>numeroinconnu12</dc:creator>
      <dc:date>2020-03-12T07:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: dedup problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491013#M137100</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| stats count(Matricule) as "Total" list(Nom) as Nom list(Date) as "Date et heure de connexion" list(src_user) as Utilisateur by UA
→
| stats count(Matricule) as "Total" list(Nom) as Nom values(Date) as "Date et heure de connexion" list(src_user) as Utilisateur by UA
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 08:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491013#M137100</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-12T08:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: dedup problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491014#M137101</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;Try to use dedup before the 6th  step. &lt;/P&gt;

&lt;P&gt;index=juniper_vpn  (ID=AUT22673 OR ID=AUT24803) ......67&lt;BR /&gt;
 | eval src_user=upper(src_user)&lt;BR /&gt;
 | join type=left user [| _accounts.csv |search domaine="intra"| eval user=matricule ]&lt;BR /&gt;
 | join type=left ua [|_dirigeant.csv | eval ua=UA ]&lt;BR /&gt;
 | dedup user&lt;BR /&gt;
 | rename user as Matricule, cn as Nom, ua as UA&lt;/P&gt;

&lt;P&gt;Let me know if that works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:37:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/dedup-problem/m-p/491014#M137101</guid>
      <dc:creator>pradeepk50</dc:creator>
      <dc:date>2020-09-30T04:37:22Z</dc:date>
    </item>
  </channel>
</rss>

