<?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: checking if all values from lookup exists in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679730#M232365</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if you want to list all the values from the lookup that aren't present in the search results, you will not have these fields!&lt;/P&gt;&lt;P&gt;Anyway, you can add all the other fields adding them&amp;nbsp; and using the values option in stats command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myidnex sourcetype=mysourcetype source=mysource
| stats
   count
   values(ACCUM_CODE) AS ACCUM_CODE
   values(LOCK_CODE) AS LOCK_CODE
   values(PERIOD_KEY) AS PERIOD_KEY
   values(UPD_DATE) AS UPD_DATE
   values(UPD_TIME) AS UPD_TIME
   values(USER_NAME) AS USER_NAME
   BY TABLEQ
| append [ | inputlookup your_lookup| eval count=0 | rename tableq  AS TABLEQ | fields TABLEQ count ]
| stats
   sum(count) AS total
   values(ACCUM_CODE) AS ACCUM_CODE
   values(LOCK_CODE) AS LOCK_CODE
   values(PERIOD_KEY) AS PERIOD_KEY
   values(UPD_DATE) AS UPD_DATE
   values(UPD_TIME) AS UPD_TIME
   values(USER_NAME) AS USER_NAME
   BY TABLEQ
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jul 2025 07:02:46 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2025-07-03T07:02:46Z</dc:date>
    <item>
      <title>checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679596#M232329</link>
      <description>&lt;P&gt;Hey, im trying to do something relative easy and for some reason can't make it..&lt;/P&gt;&lt;P&gt;i have a lookup named tableq_lookyp with only one column tableq with the values:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1,2,4,5,7,8,10,11,12,13,14,&lt;/SPAN&gt;&lt;SPAN&gt;15,16,20,21,22 (each value is different row)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and i have this search:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myidnex sourcetype=mysourcetype source=mysource

| table ACCUM_CODE LOCK_CODE PERIOD_KEY TABLEQ UPD_DATE UPD_TIME USER_NAME&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;i want to check if all of the values from the tableq lookup exists in my search&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so i should get 16 rows (as the amount of different values in tableq) and a new column with yes/no options that tell me if the value appear in the search/lookup or not&amp;nbsp;&lt;BR /&gt;what is the best way of doing it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks !&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2025 11:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679596#M232329</guid>
      <dc:creator>dorHerbesman</dc:creator>
      <dc:date>2025-07-02T11:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679598#M232330</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;&amp;nbsp;Hi,&amp;nbsp;you&amp;nbsp;must&amp;nbsp;upload&amp;nbsp;the&amp;nbsp;lookup&amp;nbsp;first,&amp;nbsp;then&amp;nbsp;use&amp;nbsp;the&amp;nbsp;|inputlookup&amp;nbsp;tableq_lookyp&amp;nbsp;to&amp;nbsp;check. Upon&amp;nbsp;successfully&amp;nbsp;viewing&amp;nbsp;your&amp;nbsp;lookup&amp;nbsp;data,&amp;nbsp;you&amp;nbsp;can&amp;nbsp;access&amp;nbsp;Splunk&amp;nbsp;by&amp;nbsp;using&amp;nbsp;the&amp;nbsp;lookup&amp;nbsp;command. And&amp;nbsp;the&amp;nbsp;only&amp;nbsp;way&amp;nbsp;to&amp;nbsp;find&amp;nbsp;out&amp;nbsp;is&amp;nbsp;to&amp;nbsp;use&amp;nbsp;your&amp;nbsp;initial&amp;nbsp;search&amp;nbsp;query&amp;nbsp;along&amp;nbsp;with&amp;nbsp;the&amp;nbsp;lookup&amp;nbsp;command. Kindly&amp;nbsp;review&amp;nbsp;the&amp;nbsp;Splunk&amp;nbsp;documents&amp;nbsp;listed&amp;nbsp;below&amp;nbsp;for&amp;nbsp;your&amp;nbsp;reference.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Lookup#Basic_example" target="_blank"&gt;lookup - Splunk Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679598#M232330</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2024-03-05T15:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679599#M232331</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;&amp;nbsp;I don't see the lookup command in your search.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;index=elbit_hr sourcetype=synerionDB source=retromng&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;|&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;table ACCUM_CODE LOCK_CODE PERIOD_KEY TABLEQ UPD_DATE UPD_TIME USER_NAME&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:09:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679599#M232331</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2024-03-05T15:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679602#M232333</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myidnex sourcetype=mysourcetype source=mysource
| stats
   count
   BY TABLEQ
| append [ | inputlookup your_lookup | eval count=0 | rename tableq  AS TABLEQ | fields TABLEQ count ]
| stats
   sum(count) AS total
   BY TABLEQ
| 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 Jul 2025 09:49:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679602#M232333</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-07-03T09:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679723#M232362</link>
      <description>&lt;P&gt;OK the calculation is correct but now i've lost all other fields&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;| table ACCUM_CODE LOCK_CODE PERIOD_KEY TABLEQ UPD_DATE UPD_TIME USER_NAME&lt;/PRE&gt;&lt;P&gt;how can i regain them but keep the calulation code you provide?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks again for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 07:02:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679723#M232362</guid>
      <dc:creator>dorHerbesman</dc:creator>
      <dc:date>2024-03-06T07:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679730#M232365</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if you want to list all the values from the lookup that aren't present in the search results, you will not have these fields!&lt;/P&gt;&lt;P&gt;Anyway, you can add all the other fields adding them&amp;nbsp; and using the values option in stats command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myidnex sourcetype=mysourcetype source=mysource
| stats
   count
   values(ACCUM_CODE) AS ACCUM_CODE
   values(LOCK_CODE) AS LOCK_CODE
   values(PERIOD_KEY) AS PERIOD_KEY
   values(UPD_DATE) AS UPD_DATE
   values(UPD_TIME) AS UPD_TIME
   values(USER_NAME) AS USER_NAME
   BY TABLEQ
| append [ | inputlookup your_lookup| eval count=0 | rename tableq  AS TABLEQ | fields TABLEQ count ]
| stats
   sum(count) AS total
   values(ACCUM_CODE) AS ACCUM_CODE
   values(LOCK_CODE) AS LOCK_CODE
   values(PERIOD_KEY) AS PERIOD_KEY
   values(UPD_DATE) AS UPD_DATE
   values(UPD_TIME) AS UPD_TIME
   values(USER_NAME) AS USER_NAME
   BY TABLEQ
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 07:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679730#M232365</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-07-03T07:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679732#M232367</link>
      <description>&lt;P&gt;that's exectly what i wanted! thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 07:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679732#M232367</guid>
      <dc:creator>dorHerbesman</dc:creator>
      <dc:date>2024-03-06T07:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: checking if all values from lookup exists</title>
      <link>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679734#M232369</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264100"&gt;@dorHerbesman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 07:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/checking-if-all-values-from-lookup-exists/m-p/679734#M232369</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-03-06T07:38:24Z</dc:date>
    </item>
  </channel>
</rss>

