<?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: Display fields with different values only between 2 row in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551966#M156633</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233446"&gt;@yuming1127&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;one little question: the pair product/color is unique in your results or not?&lt;/P&gt;&lt;P&gt;if yes, you can use stats to have your need.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| stats dc(product_id) AS dc_product_id values(product_id) AS product_id dc(description1) AS dc_description1 values(description1) AS description1	dc(description3) AS dc_description3 values(description3) AS description3 BY product color
| where dc_product_id&amp;gt;1 OR dc_description1&amp;gt;1 OR dc_description1&amp;gt;3
| table product color description1 description3&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2021 06:51:26 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-05-18T06:51:26Z</dc:date>
    <item>
      <title>Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551939#M156628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I cannot found any similar thread on this issue, my aim is to display fields with different values between 2 row, so my problem will be...&lt;/P&gt;&lt;P&gt;my search...&lt;/P&gt;&lt;P&gt;&lt;U&gt;statistics view from my search&lt;/U&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;product&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;color&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;product_id&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;description1&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;description2&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;description3&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;description4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;phone&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;blue&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;tag_1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;fail&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;phone&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;blue&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;tag_2&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;fail&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="5%" height="24px"&gt;fail&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desired_outcome&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;TABLE border="1" width="80.98140098693466%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;product&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;color&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;product_id&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;description1&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;description3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;phone&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;blue&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;tag_1&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="24px"&gt;phone&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;blue&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;tag_2&lt;/TD&gt;&lt;TD width="20%" height="24px"&gt;fail&lt;/TD&gt;&lt;TD width="10%" height="24px"&gt;pass&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; if option 1 not achievable,&amp;nbsp; maybe this work as well.&lt;/P&gt;&lt;TABLE border="1" width="398px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="145.6px" height="24px"&gt;product_id&lt;/TD&gt;&lt;TD width="148px" height="24px"&gt;description1&lt;/TD&gt;&lt;TD width="103.2px" height="24px"&gt;description3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="145.6px" height="24px"&gt;tag_1&lt;/TD&gt;&lt;TD width="148px" height="24px"&gt;pass&lt;/TD&gt;&lt;TD width="103.2px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="145.6px" height="24px"&gt;tag_2&lt;/TD&gt;&lt;TD width="148px" height="24px"&gt;fail&lt;/TD&gt;&lt;TD width="103.2px" height="24px"&gt;Pass&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 01:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551939#M156628</guid>
      <dc:creator>yuming1127</dc:creator>
      <dc:date>2021-05-18T01:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551964#M156631</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="product	color	product_id	description1	description2	description3	description4
phone	blue	tag_1	pass	pass	 	fail 
phone	blue	tag_2	fail	pass	pass	fail"
| multikv forceheader=1
| fields - _* linecount
| transpose 0
| eval same=if('row 1'=='row 2',"same","different")
| where same="different"
| fields - same
| transpose 0 header_field=column
| fields - column&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 18 May 2021 06:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551964#M156631</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-18T06:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551966#M156633</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233446"&gt;@yuming1127&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;one little question: the pair product/color is unique in your results or not?&lt;/P&gt;&lt;P&gt;if yes, you can use stats to have your need.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your_search
| stats dc(product_id) AS dc_product_id values(product_id) AS product_id dc(description1) AS dc_description1 values(description1) AS description1	dc(description3) AS dc_description3 values(description3) AS description3 BY product color
| where dc_product_id&amp;gt;1 OR dc_description1&amp;gt;1 OR dc_description1&amp;gt;3
| table product color description1 description3&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 06:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551966#M156633</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-05-18T06:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551970#M156635</link>
      <description>&lt;P&gt;Sorry &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;, but this doesn't quite work if some of the values are null as they don't get included in the dc count. However, you could use fullnull to get around this. (Also, there is a typo in the where clause, it should be dc_description3&amp;gt;1.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 07:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551970#M156635</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-18T07:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551982#M156643</link>
      <description>&lt;P&gt;great effort but I don't get desired outcome,&lt;BR /&gt;description1-description4 is just example, which the values are randomize, my real data have like 70 + description.&lt;BR /&gt;btw thanks for the reply&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 07:53:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551982#M156643</guid>
      <dc:creator>yuming1127</dc:creator>
      <dc:date>2021-05-18T07:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551983#M156644</link>
      <description>&lt;P&gt;Great one,&lt;BR /&gt;any idea to exclude &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;product &lt;FONT color="#000000"&gt;and&lt;/FONT&gt; color&lt;/STRONG&gt;&lt;/FONT&gt; from the matching? or re-append product and color after the matching.&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 07:56:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551983#M156644</guid>
      <dc:creator>yuming1127</dc:creator>
      <dc:date>2021-05-18T07:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551984#M156645</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's ok, i'm okay to edit the query&lt;BR /&gt;| eval same=if('row 1'=='row 2' AND 'row 1' != "phone" AND 'row 1' != "blue","same","different")&lt;/P&gt;&lt;P&gt;able to get expected outcome (1),&lt;/P&gt;&lt;P&gt;Thanks alot&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 08:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/551984#M156645</guid>
      <dc:creator>yuming1127</dc:creator>
      <dc:date>2021-05-18T08:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573825#M199970</link>
      <description>&lt;P&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168" target="_blank"&gt;@ITWhisperer&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We have a similar question to this thread but in our case we're trying to compare 2 lookup files for user-IDs and if there's a match do a count of all the accounts that have a .admin in the name.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;We're able to do a basic compare using "where isnull(userPrincipalName)" but not sure what's needed to compare if the user exist, then do a count .admin usernames.&lt;BR /&gt;&lt;BR /&gt;Here's what we have so far:&amp;nbsp;&lt;BR /&gt;| inputlookup UserID-File.csv | lookup UserID2-File userPrincipalName OUTPUTNEW userPrincipalName as userPrincipalName | where isnull(userPrincipalName)&lt;BR /&gt;&lt;BR /&gt;Any thoughts?&amp;nbsp; Thanks in advanced.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 14:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573825#M199970</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-11-05T14:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573829#M199973</link>
      <description>&lt;LI-CODE lang="markup"&gt;| regex userPrincipalName="\.admin"
| stats count&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Nov 2021 14:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573829#M199973</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-05T14:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573839#M199976</link>
      <description>&lt;P&gt;Thank you so much for your reply.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Since this is comparing 2 lookup files, the common field between the 2 files is the userPrincipalName.&amp;nbsp; However we need to extract the sAMAccountName (which was exported from Active Directory) that contains a userID that have a .sa or .svc at the end of the name.&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts on how to achieve this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;To further clarify the 1st lookup file in the SPL is the file from AD and 2nd file is not.&amp;nbsp; We've notice the 1st file referenced is where the results return from if it meets the search criteria.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;| inputlookup ADUserID-File.csv | lookup ExDbUserID2-File userPrincipalName OUTPUTNEW userPrincipalName as userPrincipalName | where isnull(userPrincipalName)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 16:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573839#M199976</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-11-05T16:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573840#M199977</link>
      <description>&lt;P&gt;I am not sure I understand. Is this is a third source that you want to lookup and compare or something that is already in one of the two sources you have used already?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 16:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573840#M199977</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-05T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573842#M199978</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I am not sure I understand. Is this is a third source that you want to lookup and compare or something that is already in one of the two sources you have used already?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sorry for the confusion.&amp;nbsp; These are same 2 sources.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 16:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573842#M199978</guid>
      <dc:creator>marceloalejandr</dc:creator>
      <dc:date>2021-11-05T16:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display fields with different values only between 2 row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573847#M199980</link>
      <description>&lt;P&gt;Adapting the solution provided by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;to provide Desired Outcome 1.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="product	color	product_id	description1	description2	description3	description4
phone	blue	tag_1	pass	pass	 	fail
phone	blue	tag_2	fail	pass	pass	fail" 
| multikv forceheader=1 
| fields - _* linecount 
| eval pKey=product.":".color.":".product_id 
| fields - product color product_id 
| transpose 0 
| eval same=if('row 1'=='row 2',"same","different") 
| where same="different" 
| fields - same 
| transpose 0 header_field=column 
| rex field=pKey "^(?&amp;lt;product&amp;gt;.*):(?&amp;lt;color&amp;gt;.*):(?&amp;lt;product_id&amp;gt;.*)" 
| fields - column pKey&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Nov 2021 18:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-fields-with-different-values-only-between-2-row/m-p/573847#M199980</guid>
      <dc:creator>tread_splunk</dc:creator>
      <dc:date>2021-11-05T18:07:45Z</dc:date>
    </item>
  </channel>
</rss>

