<?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: need help in order to compare 2 columns and display one related field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527037#M148765</link>
    <description>&lt;P&gt;Assuming that computer and computer2 have similar values but different field names.&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index1" OR index="index2"
|eval comp_name=coalesce(computer,computer2)
|stats list(user) as user , dc(index) as dc_index by comp_name
|where dc_index &amp;lt; 2&lt;/LI-CODE&gt;&lt;P&gt;You may add other interesting fields to stats&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:23:54 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2020-10-29T09:23:54Z</dc:date>
    <item>
      <title>need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527024#M148762</link>
      <description>&lt;P&gt;Hi, I'm Alex from France&lt;BR /&gt;as almost everyone here, I need some splunk guru ^^&lt;/P&gt;&lt;P&gt;fields computer and user are in index1, computer2 is in index2&lt;BR /&gt;I need a table with computer and related user fields, but only computers which are not in computer2&lt;BR /&gt;I can't get my table, please help me!&lt;/P&gt;&lt;P&gt;((index="index1") OR (index="index2"))&lt;BR /&gt;| streamstats count by computer, user, computer2&lt;BR /&gt;| stats values(computer) AS computer, values(computer2) AS computer2&lt;BR /&gt;| mvexpand computer&lt;BR /&gt;| where computer!=computer2&lt;BR /&gt;| table computer&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527024#M148762</guid>
      <dc:creator>maz38</dc:creator>
      <dc:date>2020-10-29T08:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527037#M148765</link>
      <description>&lt;P&gt;Assuming that computer and computer2 have similar values but different field names.&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index1" OR index="index2"
|eval comp_name=coalesce(computer,computer2)
|stats list(user) as user , dc(index) as dc_index by comp_name
|where dc_index &amp;lt; 2&lt;/LI-CODE&gt;&lt;P&gt;You may add other interesting fields to stats&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527037#M148765</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-10-29T09:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527042#M148767</link>
      <description>&lt;P&gt;Hi, thank you for your quick answer&lt;/P&gt;&lt;P&gt;I think it is not working, I have some computers in both fields that are displayed...&lt;/P&gt;&lt;P&gt;I'm waiting 12 results, got 25...&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527042#M148767</guid>
      <dc:creator>maz38</dc:creator>
      <dc:date>2020-10-29T09:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527047#M148768</link>
      <description>&lt;P&gt;Do you have some sample data from both dataset?&lt;/P&gt;&lt;P&gt;Can you try this and check whether the output is right&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index1" OR index="index2"
|eval comp_name=if(isnull(computer),computer2,computer)
|eventstats dc(index) as dc_index by comp_name
|table index,comp_name,computer,computer2,dc_index&lt;/LI-CODE&gt;&lt;P&gt;comp_name should have values either from index1 or index2 and dc_index should have count 2 for matching records of computer and computer2&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:58:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527047#M148768</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-10-29T09:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527049#M148770</link>
      <description>&lt;P&gt;OK, I think I need to explain more...&lt;/P&gt;&lt;P&gt;a computer can be multiple times in computer1, and a computer2 item is always present in computer1, but not the over way around&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 10:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527049#M148770</guid>
      <dc:creator>maz38</dc:creator>
      <dc:date>2020-10-29T10:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527054#M148772</link>
      <description>&lt;P&gt;Ok, here is the sample data , I am trying&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index1
====
commputer="computer1", user="user1"
commputer="computer1", user="user1"
commputer="computer2", user="user2"
commputer="computer2", user="user2"
commputer="computer3", user="user3"
commputer="computer4", user="user4"
commputer="computer4", user="user4"
commputer="computer4", user="user4"
commputer="computer4", user="user4"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index2
==
computer2="computer1", user="user1"
computer2="computer2", user="user2"&lt;/LI-CODE&gt;&lt;P&gt;I get 2 index for common records computer1 and computer2 since they are in both&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="renjith_nair_0-1603966724010.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11573iE8B296061621AFFB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="renjith_nair_0-1603966724010.png" alt="renjith_nair_0-1603966724010.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Let me know what's different from the dataset and expected output&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 10:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527054#M148772</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-10-29T10:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527064#M148775</link>
      <description>&lt;P&gt;"comp_name should have values either from index1 or index2 and dc_index should have count 2 for matching records of computer and computer2"&lt;/P&gt;&lt;P&gt;I think it's not the good way, because an item can be multiple times in computer1, but there is no empty fields, computer1 and computer2 are always not null&lt;/P&gt;&lt;P&gt;or maybe with some dedup on fields?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 11:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527064#M148775</guid>
      <dc:creator>maz38</dc:creator>
      <dc:date>2020-10-29T11:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: need help in order to compare 2 columns and display one related field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527065#M148776</link>
      <description>&lt;P&gt;I can't give you any data, my company is working in cybersecurity.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 11:03:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-in-order-to-compare-2-columns-and-display-one-related/m-p/527065#M148776</guid>
      <dc:creator>maz38</dc:creator>
      <dc:date>2020-10-29T11:03:51Z</dc:date>
    </item>
  </channel>
</rss>

