<?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 convert values in a single row with missing fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619428#M215286</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250925"&gt;@AZURAKAGAMI&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can use the solution for missed hosts that you can find in many answers (also from me) in Community.&lt;/P&gt;&lt;P&gt;So, if you have the Username field both in your main search and in your lookup, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval Username=lower(Username)
| stats count BY Username
| append [ | inputlookup filename.csv | eval Username=lower(Username), count=0 | fields Username count ]
| stats sum(count) AS total BY Username
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2022 09:12:44 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-11-03T09:12:44Z</dc:date>
    <item>
      <title>How to convert values in a single row with missing fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619426#M215285</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How to display what values are missing in my lookup table comparing to actual data?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one field with lists of users from my csv file.&amp;nbsp; I took a specific range of users and trying to find out which of users are missing from my csv file. I cannot find a solution, can someone help me out?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;My query.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;|inputlookup filename.csv&lt;/P&gt;
&lt;P&gt;|search Username IN (user A,&amp;nbsp; user B, User C, etc.)&lt;/P&gt;
&lt;P&gt;|dedup Username |fields Username&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 13:53:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619426#M215285</guid>
      <dc:creator>AZURAKAGAMI</dc:creator>
      <dc:date>2022-11-03T13:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert values in a single row with missing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619428#M215286</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250925"&gt;@AZURAKAGAMI&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can use the solution for missed hosts that you can find in many answers (also from me) in Community.&lt;/P&gt;&lt;P&gt;So, if you have the Username field both in your main search and in your lookup, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval Username=lower(Username)
| stats count BY Username
| append [ | inputlookup filename.csv | eval Username=lower(Username), count=0 | fields Username count ]
| stats sum(count) AS total BY Username
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 09:12:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619428#M215286</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-03T09:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert values in a single row with missing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619432#M215287</link>
      <description>&lt;P&gt;Hi, Giuseppe,&lt;/P&gt;&lt;P&gt;Thank you for your quick response but that didn't help. Your search is giving me list of all users that I have in my csv file (which is enormous amount) but I found a solution to this.&lt;/P&gt;&lt;P&gt;Thank you for your time anyways.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval Username="User A, User B, User C, User D, User E, User F"
| makemv delim="," Username
| mvexpand Username
| fields - _time
| lookup filename.csv Username
| search NOT fieldname=*&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 09:50:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619432#M215287</guid>
      <dc:creator>AZURAKAGAMI</dc:creator>
      <dc:date>2022-11-03T09:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert values in a single row with missing fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619445#M215288</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250925"&gt;@AZURAKAGAMI&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry I didn't understand your need, probably this solution is easier:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval Username="User A, User B, User C, User D, User E, User F"
| makemv delim="," Username
| mvexpand Username
| search NOT [ | inputlookup filename.csv | fields Username]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 12:05:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-values-in-a-single-row-with-missing-fields/m-p/619445#M215288</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-03T12:05:14Z</dc:date>
    </item>
  </channel>
</rss>

