<?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 join on optional date range without map? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670257#M229787</link>
    <description>&lt;P&gt;This is an example based on your example dataset&lt;/P&gt;&lt;P&gt;It assumes that there is a lookup file requests.csv (which I generated using the second code snipped below)&lt;/P&gt;&lt;P&gt;The makeresults stuff just sets up your data, so assume your search runs up to the inputlookup statement below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw=split(replace("time,os,host,user
1/10/2023 9:00,Linux,Server1,UserA
1/10/2023 11:00,Linux,Server1,UserA
1/10/2023 12:00,Linux,Server2,UserA
1/10/2023 9:00,Linux,Server2,UserB
1/10/2023 14:00,Linux,Server1,UserA","\n","###"),"###")
| multikv forceheader=1 
| eval _time=strptime(time, "%d/%m/%Y %k:%M")
| table _time,os,host,user
| inputlookup append=t requests.csv
| eval user=coalesce(user, reporterName)
| foreach change* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=strptime('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;', "%d/%m/%Y %k:%M") ]
| stats list(_time) as _time values(key) as key values(reporterEmail) as reporterEmail values(summary) as summary values(changeStartDate) as changeStartDate values(changeEndDate) as changeEndDate by user host
| eval isInside=mvmap(_time, if(_time&amp;gt;=changeStartDate AND _time&amp;lt;changeEndDate, _time.":1", _time.":0"))
| mvexpand isInside
| rex field=isInside "(?&amp;lt;_time&amp;gt;[^:]*):(?&amp;lt;isInside&amp;gt;\d)"&lt;/LI-CODE&gt;&lt;P&gt;the logic is then that it appends the contents of the lookup file to the end of the data and makes the common name (user or reporterName) and then converts the change time fields to epoch.&lt;/P&gt;&lt;P&gt;Then the stats function joins all the items together - there is an assumption that there is only one requests in requests.csv for each user/server - if more then the logic will need to change.&lt;/P&gt;&lt;P&gt;After the stats, the mvmap just compares the times and then expands out the results with isInside showing if the event is inside the request period&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the csv generation so you can test if needed.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw=split(replace("key,host,reporterName,reporterEmail,summary,changeStartDate,changeEndDate
REQ-1000,Server1,UserA,UserA@dummy.com,Investigate error,1/10/2023 8:00,1/10/2023 13:00
REA-1001,Server2,UserB,UserB@dummy.com,Reset service,1/10/2023 8:00,1/10/2023 10:00","\n","###"),"###")
| multikv forceheader=1 
| table key,host,reporterName,reporterEmail,summary,changeStartDate,changeEndDate
| outputlookup requests.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Nov 2023 06:42:39 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-11-30T06:42:39Z</dc:date>
    <item>
      <title>How to join on optional date range without map?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/669949#M229712</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to report on access requests to actual logins.&lt;/P&gt;&lt;P&gt;I have a list of &lt;STRONG&gt;events&lt;/STRONG&gt; from our systems of when users have logged in:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table _time os host user clientName clientAddress signature logonType&lt;/LI-CODE&gt;&lt;P&gt;I have a list of &lt;STRONG&gt;requests&lt;/STRONG&gt; which cover a time frame and potentially multiple logins to multiple systems:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table key host reporterName reporterEmail summary changeStartDate changeEndDate&lt;/LI-CODE&gt;&lt;P&gt;So i want a list of &lt;STRONG&gt;events&lt;/STRONG&gt;, with any corresponding &lt;STRONG&gt;requests&lt;/STRONG&gt;&amp;nbsp;(could be none, so i can alert the user/IT) joining on host, user, and _time between changeStartDate and changeEndDate.&lt;/P&gt;&lt;P&gt;I do have this working by using map (see below), but it's very slow and not operable over large datasets/times. There must be a better way.&lt;/P&gt;&lt;P&gt;I had issues with matching on the time range, and where it may not have a match, and optional username matching based on OS.&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;Existing search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...search...
| table _time os host user clientName clientAddress signature logonType 
| convert mktime(_time) as epoch 
| sort -_time 
| map maxsearches=9999 search="
| inputlookup Request_admin_access.csv
| eval os=\"$os$\"
        | eval outerHost=\"$host$\"
        | eval user=\"$user$\"
        | eval clientName=\"$clientName$\"
        | eval clientAddress=\"$clientAddress$\"
        | eval signature=\"$signature$\"
        | eval logonType=\"$logonType$\"
        | eval startCheck=if(tonumber($epoch$)&amp;gt;=tonumber(changeStartDate), 1, 0) 
| eval endCheck=if(tonumber($epoch$)&amp;lt;=tonumber(changeEndDate), 1, 0) 
| eval userCheck=if(normalisedReporterName==\"$normalisedUserName$\", 1, 0)
| where host=outerHost
| eval match=case(
  os==\"Windows\" AND startCheck==1 AND endCheck==1,1,
  os==\"Linux\" AND startCheck==1 AND endCheck==1 AND userCheck==1,1)
| appendpipe [
  | makeresults format=csv data=\"_time,os,host,user,clientName,clientAddress,signature,logonType,wimMatch
$epoch$,$os$,$host$,$user$,$clientName$,$clientAddress$,$signature$,$logonType$,1\"
          ]
| where match==1 
| eval _time=$epoch$
| head 1
| convert ctime(changeStartDate) timeformat=\"%F %T\" | convert ctime(changeEndDate) timeformat=\"%F %T\"
| fields _time os host user clientName clientAddress signature logonType key reporterName reporterEmail summary changeStartDate changeEndDate"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 01:08:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/669949#M229712</guid>
      <dc:creator>apps_inpaytech</dc:creator>
      <dc:date>2023-11-28T01:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to join on optional date range without map?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/669978#M229722</link>
      <description>&lt;P&gt;The starting point for correlating two datasets together is to combine them into a single search then uses stats to combine them through a common field.&lt;/P&gt;&lt;P&gt;So, you should start with this approach&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...search...
| table _time os host user clientName clientAddress signature logonType 
| convert mktime(_time) as epoch 
| sort -_time 
| inputlookup append=t Request_admin_access.csv
... now use eval+stats to join and collapse the data events and the lookup events together, e.g.
| stats values(*) as * by host&lt;/LI-CODE&gt;&lt;P&gt;You seem to have host in both data and lookup&lt;/P&gt;&lt;P&gt;Map is certainly not the right tool for this job.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 07:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/669978#M229722</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-11-28T07:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to join on optional date range without map?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670253#M229785</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;, thanks for your response, but i am still having trouble with how to 'now use eval+stats to join and collapse the data events and the lookup events together'.&lt;/P&gt;&lt;P&gt;I don't see how i can apply these rules:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Optional joining, i.e. i want every record in the events list&lt;/LI&gt;&lt;LI&gt;Event date is between the request&amp;nbsp;changeStartDate and&amp;nbsp;changeEndDate&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;For example i could have these events (some columns removed for brevity)&lt;/P&gt;&lt;TABLE width="600"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;_time&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="54"&gt;&lt;STRONG&gt;os&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="97"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="111"&gt;&lt;STRONG&gt;user&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 9:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 11:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 12:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server2&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 9:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server2&lt;/TD&gt;&lt;TD&gt;UserB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 14:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;and these requests&lt;/P&gt;&lt;TABLE width="850"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;key&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="54"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="97"&gt;&lt;STRONG&gt;reporterName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="111"&gt;&lt;STRONG&gt;reporterEmail&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="110"&gt;&lt;STRONG&gt;summary&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;changeStartDate&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;changeEndDate&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;REQ-1000&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:UserA@dummy.com" target="_blank" rel="noopener"&gt;UserA@dummy.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;Investigate error&lt;/TD&gt;&lt;TD&gt;1/10/2023 8:00&lt;/TD&gt;&lt;TD&gt;1/10/2023 13:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;REA-1001&lt;/TD&gt;&lt;TD&gt;Server2&lt;/TD&gt;&lt;TD&gt;UserB&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:UserB@dummy.com" target="_blank" rel="noopener"&gt;UserB@dummy.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;Reset service&lt;/TD&gt;&lt;TD&gt;1/10/2023 8:00&lt;/TD&gt;&lt;TD&gt;1/10/2023 10:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;and i would like this result&lt;/P&gt;&lt;TABLE width="978"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;_time&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="54"&gt;&lt;STRONG&gt;os&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="97"&gt;&lt;STRONG&gt;host&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="111"&gt;&lt;STRONG&gt;user&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="110"&gt;&lt;STRONG&gt;key&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;reporterName&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;reporterEmail&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="72"&gt;&lt;STRONG&gt;summary&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="110"&gt;&lt;STRONG&gt;changeStartDate&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="106"&gt;&lt;STRONG&gt;changeEndDate&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 9:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;REQ-1000&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:UserA@dummy.com" target="_blank" rel="noopener"&gt;UserA@dummy.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;Reset service&lt;/TD&gt;&lt;TD&gt;1/10/2023 8:00&lt;/TD&gt;&lt;TD&gt;1/10/2023 13:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 11:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;REQ-1000&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:UserA@dummy.com" target="_blank" rel="noopener"&gt;UserA@dummy.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;Reset service&lt;/TD&gt;&lt;TD&gt;1/10/2023 8:00&lt;/TD&gt;&lt;TD&gt;1/10/2023 13:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 12:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server2&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023 9:00&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server2&lt;/TD&gt;&lt;TD&gt;UserB&lt;/TD&gt;&lt;TD&gt;REA-1001&lt;/TD&gt;&lt;TD&gt;UserB&lt;/TD&gt;&lt;TD&gt;&lt;A href="mailto:UserB@dummy.com" target="_blank" rel="noopener"&gt;UserB@dummy.com&lt;/A&gt;&lt;/TD&gt;&lt;TD&gt;Investigate error&lt;/TD&gt;&lt;TD&gt;1/10/2023 8:00&lt;/TD&gt;&lt;TD&gt;1/10/2023 10:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1/10/2023&amp;nbsp; 14:00:00 PM&lt;/TD&gt;&lt;TD&gt;Linux&lt;/TD&gt;&lt;TD&gt;Server1&lt;/TD&gt;&lt;TD&gt;UserA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So, UserA raised 1 request and matches to 2 of the events, but the last event does not match as it's outside the date/time range.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 03:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670253#M229785</guid>
      <dc:creator>apps_inpaytech</dc:creator>
      <dc:date>2023-11-30T03:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to join on optional date range without map?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670257#M229787</link>
      <description>&lt;P&gt;This is an example based on your example dataset&lt;/P&gt;&lt;P&gt;It assumes that there is a lookup file requests.csv (which I generated using the second code snipped below)&lt;/P&gt;&lt;P&gt;The makeresults stuff just sets up your data, so assume your search runs up to the inputlookup statement below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw=split(replace("time,os,host,user
1/10/2023 9:00,Linux,Server1,UserA
1/10/2023 11:00,Linux,Server1,UserA
1/10/2023 12:00,Linux,Server2,UserA
1/10/2023 9:00,Linux,Server2,UserB
1/10/2023 14:00,Linux,Server1,UserA","\n","###"),"###")
| multikv forceheader=1 
| eval _time=strptime(time, "%d/%m/%Y %k:%M")
| table _time,os,host,user
| inputlookup append=t requests.csv
| eval user=coalesce(user, reporterName)
| foreach change* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=strptime('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;', "%d/%m/%Y %k:%M") ]
| stats list(_time) as _time values(key) as key values(reporterEmail) as reporterEmail values(summary) as summary values(changeStartDate) as changeStartDate values(changeEndDate) as changeEndDate by user host
| eval isInside=mvmap(_time, if(_time&amp;gt;=changeStartDate AND _time&amp;lt;changeEndDate, _time.":1", _time.":0"))
| mvexpand isInside
| rex field=isInside "(?&amp;lt;_time&amp;gt;[^:]*):(?&amp;lt;isInside&amp;gt;\d)"&lt;/LI-CODE&gt;&lt;P&gt;the logic is then that it appends the contents of the lookup file to the end of the data and makes the common name (user or reporterName) and then converts the change time fields to epoch.&lt;/P&gt;&lt;P&gt;Then the stats function joins all the items together - there is an assumption that there is only one requests in requests.csv for each user/server - if more then the logic will need to change.&lt;/P&gt;&lt;P&gt;After the stats, the mvmap just compares the times and then expands out the results with isInside showing if the event is inside the request period&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the csv generation so you can test if needed.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw=split(replace("key,host,reporterName,reporterEmail,summary,changeStartDate,changeEndDate
REQ-1000,Server1,UserA,UserA@dummy.com,Investigate error,1/10/2023 8:00,1/10/2023 13:00
REA-1001,Server2,UserB,UserB@dummy.com,Reset service,1/10/2023 8:00,1/10/2023 10:00","\n","###"),"###")
| multikv forceheader=1 
| table key,host,reporterName,reporterEmail,summary,changeStartDate,changeEndDate
| outputlookup requests.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 06:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670257#M229787</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-11-30T06:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to join on optional date range without map?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670576#M229867</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;I understand the technique now!&lt;/P&gt;&lt;P&gt;After some tweaking, I now get the expected results, some important points for anyone who is reading this...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;group by parent table so that all the child records are in multi-value columns&lt;/LI&gt;&lt;LI&gt;find the multi-value index that matches&lt;/LI&gt;&lt;LI&gt;remove the non-matching&amp;nbsp;multi-value records&lt;/LI&gt;&lt;LI&gt;list() does not dedup results, this is needed when filtering the mv results by index&lt;/LI&gt;&lt;/OL&gt;&lt;LI-CODE lang="markup"&gt;| convert mktime(_time) as epoch
| inputlookup append=t Request_admin_access.csv
``` need the same use column name for stats to group on ```
| eval userForMatching=coalesce(normalisedUserName, normalisedReporterName)
``` group by events, so that all the possible child requests are in mv columns ```
| stats list(epoch) as epoch list(key) as key values(reporterName) as reporterName values(reporterEmail) as reporterEmail list(summary) as summary list(changeStartDate) as changeStartDate list(changeEndDate) as changeEndDate values(user) as user values(os) as os values(clientName) as clientName values(clientAddress) as clientAddress values(signature) as signature values(logonType) as logonType by host userForMatching 
``` expand the events ```
| mvexpand epoch
``` find the mv index where event._time between request.start and request.end dates ```
| eval isAfterStart=mvmap(changeStartDate, if(epoch&amp;gt;=changeStartDate, 1, 0))
| eval isBeforeEnd=mvmap(changeEndDate, if(epoch&amp;lt;changeEndDate, 1, 0))
| eval idx=mvfind(mvzip(isAfterStart, isBeforeEnd), "1,1")
| rename epoch as _time
``` filter to just the matching request ```
| eval key=mvindex(key, idx)
| eval reporterName=if(isnull(idx),"",reporterName)
| eval reporterEmail=if(isnull(idx),"",reporterEmail)
| eval summary=mvindex(summary, idx)
| eval changeStartDate=mvindex(changeStartDate, idx)
| eval changeEndDate=mvindex(changeEndDate, idx)
``` human readable times ```
| convert ctime(changeStartDate) timeformat="%F %T" | convert ctime(changeEndDate) timeformat="%F %T"
| table _time os host user clientName clientAddress signature logonType key reporterName reporterEmail summary changeStartDate changeEndDate
| sort -_time&lt;/LI-CODE&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 00:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-on-optional-date-range-without-map/m-p/670576#M229867</guid>
      <dc:creator>apps_inpaytech</dc:creator>
      <dc:date>2023-12-04T00:32:15Z</dc:date>
    </item>
  </channel>
</rss>

